开发者

Convert Json object into string in java

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?


You can use GSON, check user guide

Also See

  • How-do-i-use-googles-gson-api-to-deserialize-json-properly


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜