0
{
"capmpaign_id": "<SomeText>",
"start_time": "<Time In UTC Format>",
"end_time": "<Time in UTC Format>",
"song_directory": "<directory relative to sdcard root directory>",
"song_list": [
{"song_1.mp3": "<Time of play"},
{"song_2.mp3": "<Time of play>"},
{"song_3.mp3": "<Time of play>"}
],
"time_ads":{
"<audio file name>": "<Time to play>",
"<audio file name>": "<Time to play>"
},
"location_ads":{
"<audio file name>":{
"lat": 29.0000,
"long": 32.0987
},
"<audio file name>": {
"lat": 143.6543,
"long": 97.23
}
}
}
上述代码存储在一个字符串中。然后从这个字符串中任何人都可以使用gson来解析它。 我在android工作室工作,并试图解析它,但它包含json数组和对象。我不知道如何在android中使用gson解析它们,所以任何人都可以帮助我解决这个问题?使用gson解析包含json对象和数组的json字符串
我需要在GSON的帮助下解析这个不是json –