The JSON looks like this:
{
"favorited": false,
"truncated": false,
"annotations": [
{
"wpinfo": {
"type": "place",
"url": "http://m.weibo.cn/"
}
}
],
"reposts_count": 0
};
I don’t know which type I will declare with property ‘annotations’. I can’t say much English,and hope you can understand me. Thanks!
annotations is an array of object ( containing only one object in your case). So you can declare it like that :
Where MyObject is a class containing a field wpinfo.
Note: If your requirement is just to parse some JSon, you don’t need to creat classes, Jackson has a streaming API