我有以下JSON文本.如何可以解析它来获得pageName,pagePic,post_id,等?
{
"pageInfo": {
"pageName": "abc",
"pagePic": "http://example.com/content.jpg"
},
"posts": [
{
"post_id": "123456789012_123456789012",
"actor_id": "1234567890",
"picOfPersonWhoPosted": "http://example.com/photo.jpg",
"nameOfPersonWhoPosted": "Jane Doe",
"message": "Sounds cool. Can't wait to see it!",
"likesCount": "2",
"comments": [],
"timeOfPost": "1234567890"
}
]
}
Run Code Online (Sandbox Code Playgroud) 我有JSON对象如下:
member = "{interests : [{interestKey:Dogs}, {interestKey:Cats}]}";
Run Code Online (Sandbox Code Playgroud)
在Java中,我想解析上面的json对象并将值存储在arraylist中.
我正在寻找一些代码,通过它我可以实现这一点.