All Questions
117
questions
0
votes
1
answer
154
views
Parsing/Fetching json in Android Studio Java
I want the Fetch Button to display/list only the values of a and b from the object 1
{ "1": {
"a": "a",
"b": "b",
"2": {"...
0
votes
0
answers
37
views
My activity crashes when making object of json
When ever i made a object of JSONObject my crashes
when ever i enter this line in my onPostExecute override fun
val jsonObject=JSONObject(result)
my activity damn crashes after starting the android ...
0
votes
2
answers
2k
views
How to convert String having key=value pairs to Json
myString = {AcquirerName=abc, AcquiringBankCode=0.2, ApprovalCode=00};
I want to convert it to the following string.
{"AcquirerName": "abc", "AcquiringBankCode": 0.2, &...
0
votes
1
answer
399
views
Android: gson.toJson converter giving empty string for Android objects
I'm trying to covert Java object to json using Gson library, but its not working as expected and returning empty string,
my code:
String ie = new String("Jack");
Gson gson = new Gson();
...
0
votes
1
answer
55
views
Loop Object from a single Array
im sending a Json Array from Activity A to Activity B, and i want to populate that Json Array into Spinner in Activity B. but when i Log the json array from Activity A, the data becomes a single ...
-1
votes
1
answer
820
views
How can i parse Json array object using gson library [duplicate]
/* This is my json file */
{
"firstname": [
"rohit",
"sagar",
"sandeep",
"rahul",
"sweta",
"priya"
]
}
/* MainActivity.java */
...
1
vote
1
answer
2k
views
How can I get last element of JSON Object without specifying key value?
Here is the data of covid 19 coming from that API: https://data.covid19india.org/v4/min/timeseries.min.json
I want to reach the last element / or "2020-03-06" of "dates" JSON ...
0
votes
2
answers
2k
views
Get data from nested JSON Object in Java Android
How I can get the "fields" objects 0,1,2,3,4 & only the "name" object string of every object using JSONOBJECT
[
{
"name": "Bank1",
&...
1
vote
2
answers
13k
views
How to convert String to JSON Object in Kotlin Android [duplicate]
I need help to convert String in JSON object.
This is the response I am getting from WebView
webView.evaluateJavascript(
"document.getElementById('formio-submitted-data')....
0
votes
0
answers
260
views
How to parse a Arraylist nested Arraylist nested object from Json in Android studio [duplicate]
[
[
{
"description": "",
"product": "Apple",
"quantity": "2"
},
{
...
1
vote
1
answer
543
views
How to parse Json without array name in Android Studio
I am new in Android. I want to create a Periodic Table app. I found the json file and the url on github but the json do not have the array name how can I can get the object. I am following CS50 ...
2
votes
1
answer
1k
views
Difference between Getter/Setter and this other Data object Class
I'm working on a mobile application with APIs endpoints returning JSON data and i do a lot of JSON parsing for displaying different types of data in my application.
For a long time i was using Getter ...
0
votes
1
answer
91
views
Android Klaxon library: I can't handle a complex json response
I get a json response in android studio like this:
{
"status": "ok",
"data": {
idx:7397,
aqi:71,
time:{
v:1481396400,
...
0
votes
1
answer
93
views
how to display nested json objects and array in two different activites in android
I have one web service in which there are nested object and array, I have parsed the data in one activity, however I want to display the data in two different activity , how can I implement this?
0
votes
3
answers
3k
views
Json object response in kotlin
I am facing issue in get response in kotlin. My json response is:
{
"message":"Success",
"status":false,
"data":[
{
"id":"...