这是我的json需要转换为Java对象。 我已经尝试了很多方法,但没有得到成功,所以如果任何人都可以提供这方面的建议是最受欢迎的!复杂的json使用gson对java对象进行转换
{
"id":"100006077890894",
"posts":{
"data":[
{
"message":"this is my 4th post to test...((((((((((((((((",
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"id":"100006077890894_1384558691756714",
"created_time":"2013-06-12T07:02:52+0000",
"comments":{
"data":[
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"4th post 1st comment ..............",
"id":"1384558691756714_10803"
},
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"4th post 2nd comment ..............",
"id":"1384558691756714_10804"
},
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"4th post 3rd comment ..............",
"id":"1384558691756714_10805"
},
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"4th post 4th comment ..............",
"id":"1384558691756714_10806"
}
]
}
},
{
"message":"this is the 3rd post .....................:)))))))",
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"id":"100006077890894_1384557311756852",
"created_time":"2013-06-12T07:01:24+0000",
"comments":{
"data":[
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"3rd post 1st comment ..............",
"id":"1384557311756852_10797"
},
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"3rd post 2nd comment ..............",
"id":"1384557311756852_10800"
},
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"3rd post 3rd comment ..............",
"id":"1384557311756852_10801"
},
{
"from":{
"name":"Sagar Zope",
"id":"100006077890894"
},
"message":"3rd post 4th comment ..............",
"id":"1384557311756852_10802"
}
]
}
}
]
}
}
你需要JSON中的所有数据,还是只需要一个片段? – MikO
显示你已经尝试..并要求特别的问题,你失败的地方。 – Nishant
我需要所有的帖子和评论 –