Questions tagged as 'json'

3
answers

Search / object register via REST url and register with SPRING

I'm new to REST and Spring. I'm doing an exercise where I have to fetch a client via url and return (GET) it in JSON format and insert (POST) a client in JSON format. To search will be in the template below, using GET: http://localhost:8080...
asked by 28.10.2016 / 00:42
2
answers

Get JSON value and set AJAX behavior

How to get the value of JSON with ajax and define the behavior of which div and which message to display, for example: If JSON returns {"error":"true","message":"Algo deu errado"} would show any div, "error" for example, with the messa...
asked by 20.10.2016 / 08:36
2
answers

How to return a pure Json (without XML encapsulation) using webservice in C #

I have a webservice running locally , which performs queries directly in a database using a string parameter . Here is the result of the query: ThesecondtimeIhaveajavascript(Jquery)applicationthatconsumeswebserviceviaAjax.Aftersomeresearch...
asked by 02.11.2016 / 15:08
1
answer

When consuming an API that returns me serialized data in JSON, how do I know the data types of the properties?

I have no experience with JSON or web services, but I'm trying to consume an API that returns me weather data. Here is the documentation of the API I am trying to consume. This API returns me serialized data in JSON. As I read about JSON...
asked by 14.10.2016 / 03:24
1
answer

Checking the data type received in POST in PHP

I need to find out what kind of data I am getting in a user's post. The user can provide me the data in XML format, JSON HTML and text Content-Type = text / xml / json / text / html Accept = application / json / xml / text / html     
asked by 07.07.2016 / 15:01
3
answers

What is the best way to pass JSON per parameter in Angular JS?

I'm developing a system using angular js and php. The user enters his cpf and his password in a form, remembering that this user is registered in the database with his information, like, address, name, etc. When user enter his credentials, I get...
asked by 18.04.2016 / 21:24
1
answer

Is there any way to find out an error occurred in json_decode?

Well, PHP has something I sometimes find bad: Some functions throw Warning when some error occurs, and others return False or Null . A case that exemplifies this is fopen . fopen('non-exists.txt', 'r'); Generate...
asked by 26.04.2016 / 18:34
3
answers

How to Include and manipulate local JSON file?

I use JSON data to create the <options> of a <select> : jsonOptions.forEach(function(item) { var option = document.createElement('option'); option.text = item.description; option.value = item.prod...
asked by 12.01.2018 / 13:28
1
answer

C # Application Console. Read file Json

I have a Json file and it always goes wrong when I try to read it. I think because it's an array inside another array and I can not read it. Json: { "map": [ ["S", "S", "S", "S"], ["S", "S", "C", "S"], [ "S", "S", "S", "S" ],...
asked by 31.01.2018 / 13:37
1
answer

Validate for js with for each

In this screen I need to do a validation so that in each record, when the registry is allowed, in case it is marked, bring me the registry that is marked every time I edit (check or uncheck the checkbox). In the case the best way I foun...
asked by 26.11.2015 / 15:29