Momo1199
2013-07-09 06:44
采纳率: 90.9%
浏览 4.7k

转换Json字符串到Array-Android

转换代码:

String[] comments = json2.getString(KEY_COMMENT);

KEY_COMMENT 是包含很多评论的字符串,这些评论都放在PHP数组中,然后返回给电话转换成Json 字符串。应该怎么转换成数组?

下面是类似评论的例子

07-08 20:33:08.227: E/JSON(22615): {
"tag":"collectComments",
"success":1,
"error":0,
"numberOfComments":16,
"offsetNumber":1,
"comment":["test 16",
"test 15",
"test 14",
"test 13",
"test 12",
"test 11",
"test 10",
"test 9",
"test 8",
"test 7",
"test 6",
"test 5",
"test 4",
"test 3",
"test 2",
"test 1"]}n

1条回答 默认 最新

相关推荐 更多相似问题