Questions tagged as 'json'

1
answer

"Uncaught SyntaxError: Unexpected token:" error when trying to fetch data in JSON format from another URL

I'm trying to get data from a URL that returns JSON to use on my page. Apparently I'm getting the data, but for some reason I get the following error in the browser console:    "Uncaught SyntaxError: Unexpected token:". For...
asked by 26.07.2016 / 03:27
0
answers

how to read Json in xe8

is not working on xe8 = /, do you know why? Json requestresponse1.context: ["1 - Album Linha Inglesa (f) 30x30 (a) 30x60 25 laminas (120 imagens)","1 - Cobertura Religioso, Ensaio e Recep\u00e7\u00e3o","2 - Fot\u00f3grafo(s)","1 - Making Of...
asked by 04.06.2016 / 14:51
1
answer

Doubts on myjson

I would like to use this code on myjson.com but give me the error Error: Your JSON appears to be invalid. . How should I do it? [{ "imagem": '<a href="http://bit.ly/1r1QIF4" target="_blank">Clique aqui para ver o loca...
asked by 01.06.2016 / 20:45
1
answer

How to pass null value via json_encode

How can I pass a json from php to jquery with null values. I have the structure below: $data1 = null; $data2 = null; $data3 = null; json_encode(array( 'html'=>$html, 'data1'=>$data1, 'data2'=>$data2, 'data3'=>$da...
asked by 30.05.2016 / 19:10
1
answer

Invalid argument supplied for foreach () Using JSON

I'm trying to loop through foreach with an array populated in JSON. To facilitate I'm testing via $ _GET (but I already tested with array populated by php itself but did not work). $ _GET looks like this: $amigos = json_decode($_GET['amigos'])...
asked by 06.06.2016 / 23:58
1
answer

Error fetching Information from SharedPreferences Android

I have an android application, and in it I save some basic user information in SharedPreferences, however I started to display the following JSON parse error:    java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1...
asked by 14.04.2016 / 19:43
1
answer

AJAX receives JSONP as "undefined"

First of all I wanted to say that I was researching for it here in the forum and I found some similar questions, but no answer worked here. Next, I have a php file on the server that connects to the database, makes a query and returns the jso...
asked by 22.05.2016 / 01:36
0
answers

Create session when making requests to the Web Service

I created a Web Service that brings results in JSON format to java , but sometimes when the user makes a request to the Web Service the same hangs and interrupts the whole service, would like to know if there is possibility to create sessio...
asked by 23.05.2016 / 14:25
0
answers

Problem deserializing Json object with VRaptor4

Good afternoon, people. I'm having problems deserializing object json with VRaptor4. Doing some testing, you notice a situation: I'm using curl only to test the service, but when I make this request ex: curl -v -H "Content-Type: applic...
asked by 06.05.2016 / 18:24
0
answers

API for obtaining quotations data

I was wondering if there is any API that provides data (jSON or XML) of dollar and euro quotes. And it also has some that provide the indicators of values and rates of variation of agricultural products, such as: corn, soy, livestock, etc. If an...
asked by 10.04.2016 / 00:21