I've a JSONArray and I need to get the hashmap with the values, because I need to populate a stream, like twitter done. What you suggest to do?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
HashMap pairs = new HashMap(); for (int i = 0; i
Something like that.
回答2:
You can use Iterator
for getting JsonArrays
. or use this way
eg. json
{ ........ ........ "FARE":[ //JSON Array { "REG_ID":3, "PACKAGE_ID":1, "MODEL_ID":9, "MIN_HOUR":0 ....... ....... ....... } ] }
HashMap
mMap= new HashMap(); for (int i = 0; i
note: For better coding use Iterator
文章来源: JSONArray to HashMap