如何解析android中的jsonObject?

时间:2012-08-08 20:42:47

标签: java android json

  

可能重复:
  How can I parse this JSON in Android?

我有一个要求,我需要解析jsonObject。我的格式是

[{"music":{"artist":"Dire Straits","album":"The Best of Dire Straits","genre":"Pop","title":"Sultans Of Swing"}},{"camera":{"picture":"http:\/\/sp.sony-europe.com\/da\/594\/195346.jpeg","model":"Digital Still Camera - H Series - DSC-HX200V","make":"Sony","price":510}},{"book":{"description":"What is self, and how can a self come out of inanimate matter?' Is the riddle that drove Douglas Hofstadter to write this extraordinary book. In order to impart his highly original and personal view on the core mystery of human existence - the intangible sensation of 'I'-ness - Hofstadter defines the playful yet seemingly paradoxical notion of 'strange loop', and explicates this idea using analogies from many disciplines.","authors":"Douglas R Hofstadter","price":650,"id":40724766,"title":"G\u00f6del, Escher, Bach: an Eternal Golden Braid"}}]

如何解析这个?帮帮我?

2 个答案:

答案 0 :(得分:1)

Google: Android parse json

第一个教程点击:here

答案 1 :(得分:0)

您可以使用GSON(或)json-lib之类的JSON库之一来解析JSon字符串。他们为json字符串创建Java对象。