1.json data
[{\"is_distributor_limit\": 0,\ "provision_price\": Null,\ "pro_status\": \ "1\", \ "attachment\": \ " Fangan_photo.png,716\ ", \" dis_label\ ": 15,\" product_name\ ": \" 55\ ", \" Remark\ ": Null,\" price_market\ ": 55,\" AMOUNT_ Limit\ ": null,\" is_new\ ": 0,\" validity_end_date\ ": \" 2016-08-31 00:00:00\ ", \" productid\ ": 341,\" price\ ": 12,\" SCENIC _name\ ": \" \u666f\u533a\u6d4b\u8bd51\ ", \" scenicid\ ": 5,\" order_type\ ": 0,\" region_name\ ": \" \u4e0a\u6d77\u5e02\ "}, {\ "is_distributor_limit\": 0,\ "provision_price\": 12,\ "pro_status\": \ "1\", \ "attachment\": \ "fangan_photo.png,716\ ", \" dis_label\ ": 15,\" product_name\ ": \" \u6d4b\u8bd5\u9000\u6b3e\u65f6\u6548\ ", \" Remark\ ": null,\" PRICE_MARKET\ " : 12,\ "amount_limit\": Null,\ "is_new\": 0,\ "validity_end_date\": \ "2016-08-31 00:00:00\", \ "productid\": 881,\ "PRICE\ ": 12,\" scenic_name\ ": \" \u666f\u533a\u6d4b\u8bd51\ ", \" scenicid\ ": 5,\" order_type\ ": 0,\" region_name\ ": \" \U4e0a\ U6d77\u5e02\ "}]
2.json Data Conversion Array or dictionary
/* convert into NSData first. */ *jsondata = [Jsonstr datausingencoding:nsutf8stringencoding]; *err; /* then convert the NSData to the appropriate type, such as an array */ *dataarray = [nsjsonserialization jsonobjectwithdata:jsondata options: Nsjsonreadingmutablecontainers Error:nil];
JSON data and JSON data conversion