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]
580 questions
4
votes
4 answers
Create a common object for whole Application
I have created one activity that creates user profile and stores its information like name,id, profile pic etc.
This information is unique and should be use in all activities in application.
I want to know which is best way to create a common object…
Shaishav Jogani
- 1,963
- 3
- 20
- 32
4
votes
5 answers
Json response is very slow android
I'm writing an Android application which will occasionally need to download a json string of around 1MB and containing around 1000 elements, and parse each of these into an SQLite database, which I use to populate a ListActivity.
Even though the…
Rahul
- 344
- 4
- 13
4
votes
3 answers
Parse simple JSON Array without key
I need help with parsing simple JSONArray like this:
{
"text":[
"Morate popuniti polje tekst."
]
}
I have tried with this but I failed:
if (response_str != null) {
try {
JSONObject jsonObj = new JSONObject(response_str);
…
Zookey
- 2,456
- 12
- 40
- 66
4
votes
3 answers
org.json.jsonarray cannot be converted to jsonobject error
I have been trying to fix this error for 2 days now, searched and tried multiple coding types from stackoverflow.com. I have checked my JSON http://jsonformatter.curiousconcept.com/#jsonformatter. But I am still unable to find out why my code is…
Jayce
- 566
- 3
- 11
- 31
3
votes
2 answers
Convert FirebaseDatabase jsonObject to jsonArray and then that jsonArray to .xlsx format
I'm getting DataSnapshot from a Firebase database as a JsonObject. I have to convert this JsonObject into JsonArray and then that JsonArray into Excel format and then download that file into mobile storage. How can I do this?
Here I am getting the…
Umair Iqbal
- 1,122
- 1
- 13
- 29
3
votes
1 answer
I got an issue with assign value from JSON Object to Local Variable , Debugger Shows variable = 'this' is not Available
The first time it is working fine , after some testing I got this
problem.
i cant get value from Json Object , the Json Array is fine , but
value not assinged.
Am Using Andorid Studio , Volley is used to get response from web server in Json…
Joe
- 68
- 1
- 6
3
votes
2 answers
Storing a JsonObject into an HasMap
I am getting below jsonResponse.
In Every response Both key and value changes.
I want to store count & previousCountDay , keys and values in HashMap.
Json Response:
{
"count": {
"2018-03-28 18": 55,
"2018-03-28 19": 48,
…
Abhishek kumar
- 4,050
- 7
- 22
- 38
3
votes
1 answer
Cant Display Emojis From Server in textview Android
I want to display the emojis which are in json object in android.
Right now I am getting some square shapes on textview.
Pooja Pachchigar
- 101
- 2
- 12
3
votes
1 answer
Android Volley Library with GSON not able to set data to POJO classes
I want to parse below json by using Gson Library, from last two hours i'm trying the get data in the POJO classes respective to below json.
I already created POJO/Model classes for below JSON by using http://www.jsonschema2pojo.org/ , but i'm not…
Abhishek kumar
- 4,050
- 7
- 22
- 38
3
votes
3 answers
How do I modify my function to retrieve json objects to a nested json?
Here's the json I currently use in my code :
{"forceDeviceLockout":0,"canStartValue":true,"destructOnRead":[30,60,300]}
I use the following function to get the json values:
private Object getValueForField(Field field) {
if…
user2386226
3
votes
1 answer
Gson serialize with two List types in a single JSON object
I have two types of list to bind the request using Gson library. I tried in a way, it is working as excepted. But I want to know whether we have any default procedure to serialize the lists.
I tried below and working. But this is not the way to…
Abish R
- 1,367
- 2
- 14
- 33
3
votes
1 answer
How to set DeepLink in my application on Android
I want when click on my website post, open this post (content) inside my application and not open in web browser.
For example : When click on www.example.com/365 open this post into my application.
For this issue i know should DeepLink, and i added…
user7011594
3
votes
2 answers
POST-ing JSON request to FCM server isn't working
I am trying to send request to Firebase server for FCM and as FCM documentation says it should be POST request with JSON data. This is the…
Aram Sheroyan
- 468
- 1
- 6
- 16
3
votes
2 answers
How to load json data in fragment in Android
I want show 3 fragments in my Activity and load data from json in any fragments! I want show each json data into one fragment, but in my application show all of data in all fragments!
For example : i want show article data into article fragment,…
Mohammad Nouri
- 1,840
- 4
- 15
- 34
3
votes
4 answers
Iterating through json array with appended json string in android after json as response from url using volley
Hi i am trying to iterate through a json string that looks like this:
{
"vendor":[
{
"vendor_name":"Tapan Moharana",
"vendor_description":"",
"vendor_slug":"tapan",
…
Shahid Sarwar
- 1,060
- 12
- 25