-3

这是 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}] 

我必须在这个链接http://shops.alpha-trend.com/mobileapp/productinfo.php?productId=4363&function=GetProductInfo上解析 json 数组

4

1 回答 1

1

使用JSONArray

try {
  JSONArray json = new JSONArray(json_string);
  json.getJSONObject(0).getString("1"); // == "54621681"
catch (JSONException e) {
  // ....
}
于 2012-10-25T18:44:58.790 回答