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
3 answers
org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject android
My json file this:
{ "count" : "1",
"list" : [ { "address" : { "address" : "新大路128号",
"area" : "北仑区",
"city" : "宁波",
"email" : " ",
"phone" : " ",
"province" : "浙江省",
"tel" :…

longdw
- 21
- 2
- 6
0
votes
0 answers
FATAL EXCEPTION: main java.lang.NullPointerException at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112)
I am trying to make a project where i am tryin to import the datas from web server and then show then in a listview, But i am getting a error as:
FATAL EXCEPTION: main
java.lang.NullPointerException
at…

Rasik
- 1,961
- 3
- 35
- 72
0
votes
0 answers
php json obj parsing in java
in the php file I am creating a 2d dynamic array and while returning it am encoding using json_encode
$ans=array('x'=>array(),'y'=>array(),'z'=>array());
foreach ($result as &$y)
{…

user2966265
- 1
- 1
0
votes
2 answers
My app crashes when trying to do something with a caught exception
Ok
try {
Log.d("request!", "starting");
// getting product details by making HTTP request
JSONObject json = jsonParser.makeHttpRequest(LOGIN_URL, "POST",
params);
// check your…

frankelot
- 13,666
- 16
- 54
- 89
0
votes
0 answers
Error parsing data org.json.JSONEXCEPTION: End of input at charactrer 0 of
i have 2 activities, i want to log in and in the other activity i want to get some data from my database.
everything works except when i wanted to show the data there was that error.
I don't know how this will work, there is the errorlog
06-01…

Lucasz
- 1,150
- 9
- 19
0
votes
1 answer
JSON error when php responses
I have a problem with JSON.
I've got this service, that connect to php and send me data in json format.
All was ok (months ago), but today I modified a little thing and don't work.
I add a call function to simply compare 2 jSon arrays and to create…

carlosdiazp
- 195
- 1
- 2
- 17
0
votes
1 answer
Why Is JSON request returning as XML?
I'm a noob to android and I'm trying to parse a JSON from this link: "http://services.packetizer.com/spotprices/?f=json". However, when I send my request to parse it, i receive an error saying..." Error parsing data org.json.JSONException: Value xml…

B. Money
- 931
- 2
- 19
- 56
0
votes
2 answers
JSONException error: Rest php server-Android Client
.Java file. This is where error is---> int success = json.getInt(TAG_SUCCESS);
protected String doInBackground(String... args) {
// Building Parameters
List params = new ArrayList();
//…

vikas sharma
- 161
- 4
- 13
0
votes
2 answers
String cannot be converted to JSONArray
I am trying to get data from a php file.
This is my PHP code:
$sql=mysql_query("select * from `tracking`");
while($row=mysql_fetch_assoc($sql))
$output[]=$row;
print(json_encode($output));
And I really need all the data. This is the code I use to…

TheSM
- 59
- 1
- 13
0
votes
0 answers
JSONException while converting jsonobj to jsonarray
I am facing a JSONException while using JSONArray.fromObject(jsonObj). I am not able to figure out the cause behind this exception. Can someone provide some sort of input as to why this error is occured?
net.sf.json.JSONException:…

sunil
- 9,541
- 18
- 66
- 88
0
votes
2 answers
JSON Parsing Exception in Android
I have the following problem:
I have a JSON File on a Server which I try to parse in Android. But i get the following error message:
06-13 19:24:39.025: E/JSON Parser(17169): Error parsing data
org.json.JSONException: Value  of type…

user754730
- 1,341
- 5
- 31
- 62
-1
votes
2 answers
System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[System.Collections.Generic.List`1
I'm a beginner in C# development and I need your help.. I am checking all the subject in Stackoverflow but I can't find and fix my problem.
I received a JSON response from an API and I would like to transform the data in object.
------------ Here my…
-1
votes
1 answer
org.json.JSONException: JSONObject["minutes"] not found
This is my JSON object and I am trying to access the minutes from this JSON object but unable to access it, I have also tried writing some code, can anyone please help.
{"summary":"B.Com; LL.B.(Hons.) 5-Year…

Avinash Sirohi
- 1
- 1
-1
votes
2 answers
How to parse JSONArray and JSONObject with the same json key using Gson?
I need to parse a json string to Java object (i.e. Product) using Gson. Here is my problem : The json string of product will contain either list of Items(i.e. json array) or just an Item (i.e. json Object) with the same json key in both cases. How…

Santhosh
- 4,956
- 12
- 62
- 90
-1
votes
3 answers
JSON Object cannot be converted to JSON Array
I am getting this error when I am trying to convert following JSON response string from the server. I want to process JSONObject or JSONArray depending on the response from the server as most of the time it returns JSONArray.
JSON response from…

Pritesh Patel
- 678
- 17
- 35