JSON stands for (Java Script Object Notation). It is a simple and light-weight data interchange format that can be easily read by humans and machines.Android includes the org.json library which allow working efficiently with JSON. This provides easy parsing of JSON data and creating JSON strings
Questions tagged [android-json]
577 questions
0
votes
1 answer
GSON parse HashMap to List with same positions
For example i have json:
{
"1" : {...},
"5" : {...},
"2" : {...}
}
I want to parse it to List with same element positions:
So element with id = "1" will be in List on 0 position, with id="5" on 1 position, and with id="2" on 2…

Suvitruf - Andrei Apanasik
- 5,582
- 9
- 49
- 88
0
votes
0 answers
Get JSONArray using GCM in android
I am using GCM to get values from Server. It worked properly when I was trying to get a single string. Now I have to get array of values using JSON. Here I have worked as below but its crashing now am not able to exactly find the error.
Please find…

Munchoo
- 313
- 1
- 7
- 22
0
votes
0 answers
Gson JsonSyntaxException error while parsing
I know exactly what the problem is. My attempts to solve it have been futile.
Here's the problem in the json input:
As you can see, the item option_value is sometimes an array and sometimes it's just a simple string. My parser however, treats it as…

Asim
- 6,962
- 8
- 38
- 61
0
votes
2 answers
JSONString won't convert to JSONArray
I am attempting to send a string json of teams through Bluetooth to another android device. For some reason the Serializer will load a small list of teams but a large list of teams causes this error:
01-21 13:21:30.584 …

MasterProgrammer200
- 1,021
- 2
- 17
- 29
0
votes
2 answers
Need a help to parse json file/string without Key
{"5303b93":["F2424F",40.53,22.97,0,0,0,"0000","T-LGTS2","A139","-",1421675730,"","","",1,0,"UPDATE-YOUR-FR24-APP",0],
"5323c35":["F2424F",50.10,14.26,51,0,0,"2104","T-LKPR27","A139","",1421675730,"","","",1,0,"UPDATE-YOUR-FR24-APP",0]}

safiuz
- 9
- 7
0
votes
3 answers
java- How to take out json data from string
this is my json string for example :
{"data":{ "name":"Red Sox win 7-0!","famil":"INSERT TITLE HERE","tel":"2251472"}}
this is the code I write but it couldn't get the values:
JSONObject jsons = new JSONObject(myString);
Iterator>…

mahdi yamani
- 923
- 3
- 12
- 29
0
votes
1 answer
I can not get JsonArray in Ion and mapped Java class
I use the library enter link description here
my class and method:
public static class Test {
public String name;
public String soname;
public String age;
public String country;
}
private void setData(){
…

Valera Valerianov
- 247
- 1
- 3
- 14
0
votes
2 answers
I can not deal with the Json
I decided to use the new Projects for data Json. Before that I used XML(library Jsoup). I found a library ion
With it I can easily get the data in the form String or Json.
Now the question. As I continue to process this data? When working with XML…

Valera Valerianov
- 247
- 1
- 3
- 14
0
votes
0 answers
Logging in with android app using Json and phpmyadmin
I try to log in when clicking the button. I can see from the log that I have entered the correct entries. But it stays in this activity.
Here is the LoginActivity.java(When i press login, i get toast message: STAP 3):
public class LoginActivity…

M.Tlan
- 33
- 7
0
votes
2 answers
Error with Json when trying to register a user in android app
Here is the log:
12-03 23:14:39.494 899-899/com.example.thelegendaryturk.theneckoptimizer E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.thelegendaryturk.theneckoptimizer, PID: 899
android.os.NetworkOnMainThreadException
…

M.Tlan
- 33
- 7
0
votes
3 answers
Get JSON from a div in html
I have a hidden div which by JavaScript gets filled with json text. I need to find this div and read the json text from it. How can this be done?

Jonas Borggren
- 2,591
- 1
- 22
- 40
0
votes
3 answers
Error parsing data org.json.JSONException: Value
I am getting this error:
Error parsing data org.json.JSONException: Value
This is my logcat log:
11-11 22:47:28.930: D/my(25127): method equals POST is working
11-11 22:47:28.930: D/my(25127): HTTp client is working
11-11 22:47:28.930:…

xyz
- 1,325
- 5
- 26
- 50
0
votes
0 answers
Two json arrays on one list view
I wonder if it's possible to add items to list view from deferent json arrays, I could do it with one json array using custom list view adapter and ListView1 , What i need exactly is to add 1st item from the second json array after the item 4 from…

Abdulrahman S. Alkateb
- 73
- 4
- 12
0
votes
1 answer
ViewPager with Json Object
I'm having some trouble with a ViewPager...
So I have a JsonObject (World Weather Online) which has an array "Weather" containing 7 childs object, and each of these Object contain a single array "Hourly" which has 8 childs object.
I would like to…

Makoto
- 1,455
- 4
- 13
- 17
0
votes
3 answers
Android : value null at 0 of type org.json.jsonobject$1 cannot be converted to jsonobject
I'am fetching the data from the server and storing in my android application. I'am getting the JSONArray name as "project_data" and am having list of JSONObjects in the array. Am iterating the list of JSONObject based on the length of JSONArray. …

user3764346
- 129
- 2
- 5
- 15