Questions tagged [jsonexception]

Java Exception that is thrown to indicate a problem with the JSON API, as attempts to parse or construct malformed documents, use of null as a name or type mismatches on lookups.

171 questions
0
votes
1 answer

org.json.JSONException: No value for data: only emulator, works on physical device

So, I'm having the JSONException (API query), but only when I run the app on an emulator (on different virtual devices, different APIs). The problem exists only with one query. When I call for the same data in another place of the app, it works. On…
Dave
  • 9
  • 3
0
votes
1 answer

Android JSON WebRequest - JSONException: End of input at character 0

I have this piece of code here which I have grabbed from http://mobilesiri.com/json-parsing-in-android-using-android-studio/ and modified it to my own use. public String makeWebServiceCall(String addr, int requestMethod) { URL url; …
Halim
  • 11
0
votes
1 answer

Android JSONException: Value API cals quota exceeded

I just ran into this problem today where I'm trying to get values from a json file. This problem even appeared for an old fully tested build. I've also never seen this before so has anyone had any experience with this? Is there a way to resolve…
Andrew Xia
  • 365
  • 1
  • 11
0
votes
1 answer

Online Dictionary api not working using retrofit

I am trying to make an online dictionary with the use of free dictionary api using retrofit I am new in retrofit.Whenever i am running the app ,the app the crashing. Logcat Error : com.google.gson.stream.MalformedJsonException: Use …
Mohit Gaur
  • 355
  • 1
  • 3
  • 22
0
votes
0 answers

JSONExcepetion trying to receive boolean value from php

I'm facing an error on my Android app, which throw a JSONException everytime I run it. This is my PHP code, which simply return true if every value of type in my table is equals to 'run': $userId = $_POST["userId"]; $statement =…
0
votes
1 answer

Store Geoshape to Elasticsearch using EShadoop from pig

I'm trying to store geoshape (like the following) to ES via pig using org.elasticsearch.hadoop.pig.EsStorage (2.2.0) : { "location" : { "type" : "circle", "coordinates" : [-45.0, 45.0], "radius" : "100m" } } or : { …
0
votes
6 answers

send arraylist as parameter in volley request

I'm trying to send arraylist containing numbers as parameter in volley request and then parse it and display the values (in string) in toast. But I'm getting null in response. I would like to know where is the problem. json response: { …
Somnath Pal
  • 1,570
  • 4
  • 23
  • 42
0
votes
3 answers

JSONException: No value for when value exists

I'm looping through a JSON Array with the intention saving the details to a database. When I get to the following bit of JSON: {"custom":"0","is_affected":"1","title":"Up Goods","direction":"","affect_type":"O","code":"0","speed":""} I receive…
jampez77
  • 5,012
  • 7
  • 32
  • 52
0
votes
2 answers

Org.json.JSONException: Unterminated string at character

I am getting the error when creating a JSONObject by passing a string. Org.json.JSONException: Unterminated string at character My JSON string is: {"Count":741,"Data":[{rec1....},{rec2...}, etc]} This seems to only happen on Linux as I developed…
drum
  • 5,416
  • 7
  • 57
  • 91
0
votes
1 answer

JSONException to parse HTML formatted text

I'm calling a web service from my Android application. The web service returns the following JSON : Now the problem is when I'm trying to get the description element of the record object I'm getting an exception as org.json.JSONException: No value…
0
votes
2 answers

Android getting JSONObject Exception

I'm getting a JSONObject Exception in cases where the twitter value in my JSON Object media is null in my below code, even though I check to make sure I'm not assigning the value to anything if it is. Is the way I am checking correct? or how can I…
Rafa
  • 3,219
  • 4
  • 38
  • 70
0
votes
1 answer

E/Error JSONException: No value for categories in android

I have a Json data and i tried to parse into android. But i faced a JSONException;- No value for categories. anyone help me My MainActivity is here:- public class MainActivity extends AppCompatActivity implements…
Anand Jain
  • 2,365
  • 7
  • 40
  • 66
0
votes
1 answer

ArangoDB JsonSyntaxException on driver.CreateGraph

I'm attempting to test ArangoDB with its Java driver. I'm testing it on CentOS 6.6. I've been getting the following error: 15:48:01.151 [main] DEBUG com.arangodb.http.HttpManager - [REQ]http-POST:…
navewein
  • 1
  • 2
0
votes
1 answer

JSONException: No value for (parsing a JSON IMAGE)

I am trying to parse JSON data and make that data available in listview on an Android app. I receive the following error: org.json.JSONException: No value for CarModelImage 07-21 14:03:48.236 25946-25971/com.example.justin.myapplication…
JohnWilliams
  • 139
  • 1
  • 13
0
votes
1 answer

Json Exception while creating json object from a string

I'm trying to create a json object from a string . i am getting this string from a server and then replace " with \". but still i'm getting error. here is my json { "tasks": [ { "id": "activiti$1942", "description": "review the…
nainika
  • 31
  • 1
  • 7