How can I parse this Json API with a webrequest, exactly the Element "Players":
{
"data": [
{
"Id": *,
"ModId": *,
"appId": ***********,
"online": *,
"Servername": "**** **** *****",
"IpAddress": "**.**.**.**",
"Port": ****,
"ServerPassword": ********,
"StartParameters": "*******",
"Slots": **,
"Playercount": **,
"Civilians": **,
"Medics": *,
"Cops": *,
"Adac": *,
"Players": [
"***********",
"***********",
"******",
"******"
]
}
]
}
I want it to parse that I get on every time when the loop is running one playername to add it to a listview. But I do not know how to parse the "Players" element like this.
Thank you for your help!
The following code populates a list with the players from your JSON string.
You can then use this list along with an
ArrayAdapter
to populate yourListView
.