mySql table returning JSON that needs formatting for a iPhone UITableview

Posted by Michael Robinson on Stack Overflow See other posts from Stack Overflow or by Michael Robinson
Published on 2010-06-12T15:23:30Z Indexed on 2010/06/12 15:33 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

I have a php query the returns the following JSON format from a table.

[{"memberid":"18", 
"useridFK":"30",
"loginName":"Johnson",
"name":"Frank",
"age":"23",
"place":"School",
},

It needs the following format:

[{"memberid":"18" {
                    "useridFK":"30",
                    "loginName":"Johnson",
                    "name":"Frank",
                    "age":"23",
                    "place":"School",}
                    },

I can figure out where/how to convert this, Where would I create the formatting following: (1) In the php return? (2) the JSON instructions for deserialization? or (3) Some kinb of Obj-C coding instruction?

My end use is a simple Drill Down table using the NSObject, so when I select "memberid" row, I'll get the child/detail list on the next UITableview.

My Data.plist will look like the following:

  Root:                   Dictionary
       V Rows:            Array
         V Item 0:        Dictionary
            Title:        String          18
          V Children      Array
            V Item 0      Dictionary
              Title       String          30
   etc.

Thanks in advance, this site rocks.

© Stack Overflow or respective owner

Related posts about php

Related posts about iphone