Questions tagged as 'json'

2
answers

Sending json files to server

Well I'm making an application and it needs to register a certain person, this data I need to send via json and receive what happened. ajax.js /* button #btn_REGISTRAR */ $(document).on("click", "#btn_REGISTRAR", function(evt) {...
asked by 18.08.2015 / 18:46
2
answers

JavaScript XMLHttpRequest Scope Function

function getMensages(){ var xhr = new XMLHttpRequest(); xhr.open('GET', '../mensagens.php'); xhr.send(); xhr.onload=function(){ if (xhr.readyState==4 && xhr.status==200){ jsonText = xhr.responseText;...
asked by 25.02.2015 / 03:56
2
answers

How to send data to web service using AFNetworking?

I have a form that must be completed in the application and sent to the web service to register a new user. How could you send this data to the web service using AFNetworking 2.0? I tried to use the code below, but returned an error: NSD...
asked by 05.11.2014 / 19:07
1
answer

How to display the values of a JSON via PHP?

How can I display the values of a JSON via echo in PHP, I am using the code below to receive JSON from the Post Office site $json_file = file_get_contents("http://cep.correiocontrol.com.br/$cep.json"); $json_str = json_decode($json_fil...
asked by 02.01.2015 / 23:30
1
answer

When converting an object to JSON, because the occurrence of several characters "\"

To perform the Bean conversion to JSON, vice versa, I am using the org.json library for JAVA. However, although one object is normally converted, others end up being loaded with \ characters when converted to JSON, and although no...
asked by 07.10.2014 / 00:43
2
answers

How to change the data type in the $ .post request in jQuery?

var envio = $.post("processamento/busca.php", { unidade: $("#unidade").val() }) I have this request, I would like to change the datatype to json, in ajax has a datatype parameter, but I do not know how to use it in $ ....
asked by 25.02.2016 / 20:57
2
answers

How to get (in object) Facebook data?

I'm creating a Feed (dynamic content list) with the contents of a Facebook group's wall. I know there are some features that Facebook itself provides, such as the Social Plugin - Like Box . After a few tests, I saw some difficulties handling...
asked by 27.02.2014 / 19:35
1
answer

Convert Java object to JSON with Gson (generating with backslash)

I'm trying to generate a JSON based on a Java object. JSON is being generated, but some slashes have been improperly included: import java.io.Serializable; import com.google.gson.annotations.SerializedName; public class Documento implemen...
asked by 30.11.2018 / 13:00
2
answers

How to produce JSON in the format that Flot expects?

Doubt on how to serialize to return this JSON. I'm using the Flot library ( link ) to present a chart. I can generate the graphics. In my view I'm using it like this: $.ajax({ url: '/graficos/GeraTesteFlot', metho...
asked by 17.07.2014 / 21:28
1
answer

JSON error. My code can not read JSON

I should create a page that shows a catalog of albums provided in xml. From there I have to transform the catalog.xml into JSON and show it in a table with artist and with Title. The problem is that my code does not read the document because it...
asked by 01.11.2018 / 22:47