1.json数据
[{"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":"U666fU533aU6d4bU8bd51","SCENICID":5,"ORDER_TYPE":0,"REGION_NAME":"U4e0aU6d77U5e02"},{"IS_DISTRIBUTOR_LIMIT":0,"PROVISION_PRICE":12,"PRO_STATUS":"1","ATTACHMENT":"fangan_photo.png,716","DIS_LABEL":15,"PRODUCT_NAME":"U6d4bU8bd5U9000U6b3eU65f6U6548","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":"U666fU533aU6d4bU8bd51","SCENICID":5,"ORDER_TYPE":0,"REGION_NAME":"U4e0aU6d77U5e02"}]
2.json数据转换成数组或字典
/**1.先转换成NSData*/ NSData *jsonData = [jsonStr dataUsingEncoding:NSUTF8StringEncoding]; NSError *err; /**2.然后将NSData转换成相应的类型,如数组*/ NSArray *dataArray = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];