0

How to parse Json Contact Object

Hello all,
   I am succeeded in getting contact trough java code, I am getting my contacts in JSON format like this....
foo({"query":{"count":10,"created":"2012-10-05T10:07:01Z","lang":"en-US","results":{"contact":[{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531","isConnection":"false","id":"16777531","fields":[{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531/email/16777679","id":"16777679","type":"email","value":"skanthar@cisco.com","editedBy":"OWNER"},{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531/name/16777678","id":"16777678","type":"name","value":{"givenName":"Shruthi","middleName":"Kantharaj","familyName":"-X (skanthar - Mafoi at Cisco)","prefix":null,"suffix":null,"givenNameSound":null,"familyNameSound":null},"editedBy":"OWNER"}],"categories":{"created":"2012-09-21T11:55:20Z","updated":"2012-09-21T11:55:20Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531/category/Gmail","id":"2","name":"Gmail"}},{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486","isConnection":"false","id":"16777486","fields":[{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486/email/16777617","id":"16777617","type":"email","value":"nitinagarwal.march@gmail.com","editedBy":"OWNER"},{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486/name/16777616","id":"16777616","type":"name","value":{"givenName":"N!t!n","middleName":"Ag?????","familyName":"!? ? ?00? ?? ?!?¢?!????","prefix":null,"suffix":null,"givenNameSound":null,"familyNameSound":null},"editedBy":"OWNER"}],"categories":{"created":"2012-09-21T11:55:20Z","updated":"2012-09-21T11:55:20Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486/category/Gmail","id":"2","name":"Gmail"}},);

 how can I parse this in JSON Array.
 

by
2 Replies
  • I am succeeded in getting contact trough java code, I am getting my contacts in JSON format like this....
    foo({"query":{"count":10,"created":"2012-10-05T10:07:01Z","lang":"en-US","results":{"contact":[{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531","isConnection":"false","id":"16777531","fields":[{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531/email/16777679","id":"16777679","type":"email","value":"skanthar@cisco.com","editedBy":"OWNER"},{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531/name/16777678","id":"16777678","type":"name","value":{"givenName":"Shruthi","middleName":"Kantharaj","familyName":"-X (skanthar - Mafoi at Cisco)","prefix":null,"suffix":null,"givenNameSound":null,"familyNameSound":null},"editedBy":"OWNER"}],"categories":{"created":"2012-09-21T11:55:20Z","updated":"2012-09-21T11:55:20Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777531/category/Gmail","id":"2","name":"Gmail"}},{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486","isConnection":"false","id":"16777486","fields":[{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486/email/16777617","id":"16777617","type":"email","value":"nitinagarwal.march@gmail.com","editedBy":"OWNER"},{"created":"2012-09-21T11:55:21Z","updated":"2012-09-21T11:55:21Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486/name/16777616","id":"16777616","type":"name","value":{"givenName":"N!t!n","middleName":"Ag?????","familyName":"!? ? ?00? ?? ?!?¢?!????","prefix":null,"suffix":null,"givenNameSound":null,"familyNameSound":null},"editedBy":"OWNER"}],"categories":{"created":"2012-09-21T11:55:20Z","updated":"2012-09-21T11:55:20Z","uri":"http://social.yahooapis.com/v1/user/3CQUAQO2SC5IWSEXEPCFNX5HZQ/contact/16777486/category/Gmail","id":"2","name":"Gmail"}},);
    
     how can I parse this in JSON Array.
     
    0
  • Hi Suman
    Can you please help me on how to start on this, iam trying to read out the contacts which are in my account through java. Can you please help me on this



    QUOTE(Serviceswebsite Account-services @ 5 Oct 2012 3:31 PM)

     



    QUOTE(Suman @ 5 Oct 2012 4:40 AM)
    0

Recent Posts

in Contacts