tags:

views:

44

answers:

2

I have the following JSON text that i need to parse to get pageName, pagePic, post_id, etc. What is the required code?

{
          "pageInfo": {
               "pageName": "abc",
               "pagePic": "http://profile.ak.fbcdn.net/object2/367/65/q160119538822_4127.jpg"
          }
          "posts": [
               {
                    "post_id": "160119538822_302076968822",
                    "actor_id": "1183856639",
                    "picOfPersonWhoPosted": "http://profile.ak.fbcdn.net/hprofile-ak-sf2p/hs302.ash1/23104_1183856639_4894_q.jpg"
                    "nameOfPersonWhoPosted": "Andrea Raquel",
                    "message": "Sounds cool. Can't wait to see it!",
                    "likesCount": "2",
                    "comments": [
                    ]
                    "timeOfPost": "1266036226"
               }
A: 

Go to http://json.org/, scroll to (almost) the end, click on one of the many Java libraries listed.

David Dorward
+1  A: 

Try doing some research into the various Java JSON libraries available.

When you have decided which one you'd like to use, there will likely be some sample useage docs bundled along with the JavaDoc of the library.

Richie_W