这是jsonArray
[{"0":"4363","record_id":"4363","1":"54621681","shop_id":"54621681","2":"25","category_id":"25","3":"","category1":"","4":"Dress 10012","product":"Dress 10012","5":"5000","price":"5000","6":"My Description\r\nMy Description\r\nMy Description\r\nMy Description","desc":"My Description\r\nMy Description\r\nMy Description\r\nMy Description","7":"http:\/\/www.shoppingmall.pk\/images\/menuimages\/54621681\/4363","products_image":"http:\/\/www.shoppingmall.pk\/images\/menuimages\/54621681\/4363","8":"1","status":"1","9":null,"external_link":null}]
我必须解析此链接上的json数组 http://shops.alpha-trend.com/mobileapp/productinfo.php?productId=4363&function=GetProductInfo
答案 0 :(得分:1)
使用JSONArray。
try {
JSONArray json = new JSONArray(json_string);
json.getJSONObject(0).getString("1"); // == "54621681"
catch (JSONException e) {
// ....
}