我在json对象中找到了这个部分。但是我不能把它作为一个Java列表。它会出错。所以我试着把它当作一个字符串数组。但和以前一样。那么,我应该使用什么来解析这些数据,以便与我的android应用程序一起使用呢?
cuisine: {
-cuisine_names: [
"All (36)"
"Malaysian/ Singaporean (1)"
"Asian (1)"
"Australian (2)"
"Chinese (1)"
"European (3)"
"Spanish (1)"
"Greek (2)"
"Steak House (1)"
"Indian (1)"
"International (7)"
"Thai (1)"
"Italian (8)"
"Modern Australian (7)"
]
-price_ranges: [
"Any Price"
"$0-15"
"$15-30"
"$30+"
]
-times: [
"Any Time"
"05:30PM"
"06:00PM"
"06:30PM"
"07:00PM"
"07:30PM"
"08:00PM"
"08:30PM"
"09:00PM"
"09:30PM"
"10:00PM"
"10:30PM"
"11:00PM"
"11:30PM"
]
}
提前谢谢!
最佳答案
我想你忘了用逗号了。你可以用这个
http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/