2

I got the the Json value from server as

{"User":   
        {"loginId":"Rajaa",
         "firstName":"Rajaa",
         "lastName":"Ramanathan",
         "emailId": "raja@yahoo.com",
         "creationDate":"2011-01-25T12:00:00+05:30",
         "lastUpdate":"2011-01-25T12:00:00+05:30",
         "updated":"2"}
}

I want to take loginId,firstName etc as a string.

Can any one help me?

frictionlesspulley
  • 11,070
  • 14
  • 66
  • 115
rajaa
  • 21
  • 1
  • 4

2 Answers2

2

You can use GSON, check user guide

Also See

Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438
1

Use json-simple http://code.google.com/p/json-simple/ check this decoding example http://code.google.com/p/json-simple/wiki/DecodingExamples

irfn
  • 560
  • 3
  • 11