org.json.JSONException:未终止的对象

时间:2011-12-24 12:25:59

标签: android

我正在写一个Android应用程序。可以有人PLZ让我知道哪个对象在这里未终止?

12-24 17:47:26.642: DEBUG/youtubeviewer(273): 
12-24 17:47:26.672: WARN/youtubeviewer(273): org.json.JSONException: Unterminated object at character 23 of [{ "id":"12,                               
12-24 17:47:26.672: WARN/youtubeviewer(273):        "name":"Pets & Animals"},
12-24 17:47:26.672: WARN/youtubeviewer(273): 
12-24 17:47:26.672: WARN/youtubeviewer(273): { "id":"13,
12-24 17:47:26.672: WARN/youtubeviewer(273):        "name":"Science & Technology"},
12-24 17:47:26.672: WARN/youtubeviewer(273): 
12-24 17:47:26.672: WARN/youtubeviewer(273): { "id":"14,
12-24 17:47:26.672: WARN/youtubeviewer(273):        "name":"Travel & Events"}
12-24 17:47:26.672: WARN/youtubeviewer(273): 
12-24 17:47:26.672: WARN/youtubeviewer(273): ]

我的JSON对象:

[{ "id":"12, "name":"Pets & Animals"}, { "id":"13, "name":"Science & Technology"}, { "id":"14, "name":"Travel & Events"} ]

1 个答案:

答案 0 :(得分:2)

您的"id":"12应为"id":"12",其他ID也是如此。