0

I can get the following JSON data back from the web services.

Questions:

  1. Is the correct format for JSON that should return?
  2. I have no idea to get back those data on xcode?

Anyone could give me hand?

Thanks a lot.

http://192.168.11.6/specificRegion.php?region_ID=011

[{"idReference_no":"R00008","Region_ID":"011","HouseMall_Name_In_Chinese":"A","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00009","Region_ID":"011","HouseMall_Name_In_Chinese":"B","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00010","Region_ID":"011","HouseMall_Name_In_Chinese":"C","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}, {"idReference_no":"R00011","Region_ID":"011","HouseMall_Name_In_Chinese":"D","Rental_Month":"0","Rental_Hour":"0","Rental_Fee_Month":"0.00","Rental_Fee_Hour":"0.00"}]
AMadmanTriumphs
  • 4,888
  • 3
  • 28
  • 44
DW1112
  • 1
  • possible duplicate of [How to parsing JSON object in iPhone SDK (XCode) using JSON-Framework](http://stackoverflow.com/questions/3165290/how-to-parsing-json-object-in-iphone-sdk-xcode-using-json-framework) – Felix Kling Apr 28 '11 at 09:00

1 Answers1

0

For the first question: you can always check for the validity of a json object at jsonlint.com. Also check out the JSONView chrome extension if you're a chrome user. For using JSON in xcode projects, refer this question.

Community
  • 1
  • 1
tjp
  • 144
  • 6
  • Hi, Very strange ! I paste the JSON string on the JSON Validator and it said: 'Invalid JSON : error in line 1.....'. At the first line and first characters : '[' , I found there is some hidden code that invisible but if I click right arraow and left arrrow and delete it, it will be ok. It seems delete a hidden code... Why there is hidden code?? which is generated from php... – DW1112 Apr 29 '11 at 00:17
  • Could be BOM... http://stackoverflow.com/questions/4740973/why-doesnt-jquery-parsejson-work-on-all-servers – tjp May 03 '11 at 10:43