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.
Questions tagged [jsonexception]
171 questions
0
votes
1 answer
How to handle string response from php using android volley JsonObjectRequest [com.android.volley.ParseError: org.json.JSONException]?
Actually when we call API and send request in JSON format we are expecting response also come into JSON format. But here back end team sending me response in String format therefore my onErrorResponse () method get called. Here my status code is…

karthik
- 321
- 1
- 8
- 21
0
votes
1 answer
JsonSerializationException error converting json string to list of objects
I am trying to deserialize a json string into a list of objects ad keep getting "JsonSerializationException: 'Error converting value to type 'System.Collections.Generic.List" error. I googled for this error but it looks like what I am doing is…

NoBullMan
- 2,032
- 5
- 40
- 93
0
votes
3 answers
How to solve JSONException
I m trying to do a registration page from an android application activity connectiong the data to my SQLdatabase, but whenever I run it I'm getting this error:
W/System.err: org.json.JSONException: Valu of type java.lang.String
cannot be…

Mohammed Abdeen
- 13
- 5
0
votes
1 answer
GetAsync and PostAsJsonAsync methods passing parameters JsonReaderException error
I am trying to build a client side of making requests. So i do not know how i pass parameters on GetAsync method. The same problem on PostAsJsonAsync method.
Here is my code:
public static async Task
- > GetUsers(HttpClient client, Users…

Thomas Athanasiou
- 121
- 1
- 2
- 11
0
votes
2 answers
How to show the multiple markers on maps
Can anyone explain how to show multiple markers on google maps in android using the following JSON code?
[
{"id":"1","lat":"18.105917","lng":"78.838325","location":" Laxmi Filling Station( Medak Road)","distance":"0"},
…

Raghava Manchala
- 29
- 1
- 9
0
votes
1 answer
Problems to charge Json to my Android App, JSONException
I have trying to connect a application to web services that retrieves a JSON, but return JSONException
My code:
private class LlenarDatosReproduccion extends AsyncTask {
@Override
protected String…

Endy Bermúdez R
- 351
- 1
- 2
- 8
0
votes
1 answer
JSONObject["keyName"] not found exception while parsing Json data even if key is present
I have a code which returns JSON data. I need to pick certain values from it but it throws Exception for some keys while some are successful.
Here is the JSON…

rats
- 13
- 1
- 4
0
votes
0 answers
Android GET Request - No value for ImageUrl
I am trying to perform a GET request to https://www.cryptocompare.com/api/data/coinlist/, I am grabbing the values "ImageUrl, "Name", and "CoinName". However, I am only receiving about ~230 values with an "ImageUrl". I should be receiving ~1470.…

tlarsin
- 41
- 2
0
votes
2 answers
For loop printing String only once when the condition is equal to 25
I'm trying to print out an object in the JSON using Facebook Graph API.
Here's my code:
try{
JSONArray data = innerJson.getJSONArray("data");
Log.d("innerDataLength", String.valueOf(data.length()));
for (int i = 0; i

Hammad Nasir
- 2,889
- 7
- 52
- 133
0
votes
0 answers
JSONException: Value uid of type java.lang.String cannot be converted to JSONObject
I am parsing this
{
"error": false,
"uid": "1",
"user": {
"name": "admin",
"mail": "ardypranataturnip@gmail.com"
}
}
when I run my code, I've got the error
JSONException: Value uid of type java.lang.String cannot be converted to…
0
votes
1 answer
JSONException on success
I think that JSONException only works when it my request fails but when the request is valid (valid username, password) it should redirect me to another activity but instead a JSONException is showing up.
It shows the JSON string received from the…
user7994637
0
votes
2 answers
Getting Json exception for a string
I am calling an async task which returns a json object which has result,message as a string and result as cost.
Though it shows result,message string in the response object it shows json exception as no value for result.
Asynctask
public class…

Sid
- 2,792
- 9
- 55
- 111
0
votes
0 answers
Will Gson (de)serialize string paload properly that contains `\"` characters
I'm employing Gson to deserialize my payload from server. Payload contains "jsonResult" JSONObject whose value is string that contains \". So, I know the data structure of "jsonResult" and created model classes for underlying data. What I wonder is…

Farid
- 2,317
- 1
- 20
- 34
0
votes
0 answers
Custom JsonMappingException Mapper not being invoked
I've created a class to override JsonMappingException. Here is my custom exception handler.
@Provider
public class JsonMappingExceptionMapper implements ExceptionMapper {
public JsonMappingExceptionMapper(){
…

akashag26
- 123
- 1
- 1
- 7
0
votes
1 answer
Shared Preferences always returning null and raising runtime exception
I am a newbie in android app development. I am getting a weird error in my app project. When I run the code for the first time in an emulator(Genymotion) the app runs perfectly well. For working the app uses shared preferences in many places.
Then…

Hewitt V S
- 11
- 3