Hello,
i'm receiving a json string;
prettified:
I'm interested in the "data" field, which contains and array of objects. However i've resorted to parsing the data manually.
I initialized a JsonParser on the raw string, and read a map using NextObject.
Now i get a map that has a single "data" key, and the content of "data" as a value. However, the string is not Json Anymore.
This is what i get:
and that can't be read with JsonParser anymore.
As i said, i've already written a parser function, but i want to see what i'm doing wrong.
Thanks for helping
i'm receiving a json string;
B4X:
{"data":[{"id":"my-id","name":"my-name","status":"ACTIVE","createdAt":"some-time","updatedAt":"some-time"}],"meta":{"page":1,"limit":20,"total":1,"totalPages":1}}
prettified:
B4X:
{
"data":[
{
"id":"my-id",
"name":"my-name",
"status":"ACTIVE",
"createdAt":"some-time",
"updatedAt":"some-time"
}
],
"meta":{
"page":1,
"limit":20,
"total":1,
"totalPages":1
}
}
I'm interested in the "data" field, which contains and array of objects. However i've resorted to parsing the data manually.
I initialized a JsonParser on the raw string, and read a map using NextObject.
Now i get a map that has a single "data" key, and the content of "data" as a value. However, the string is not Json Anymore.
This is what i get:
B4X:
[{id=my-id, name=my-name, status=ACTIVE, createdAt=some-time, updatedAt=some-time}]
As i said, i've already written a parser function, but i want to see what i'm doing wrong.
Thanks for helping