0
在JSON對象結構響應缺少這是我的簡化對象結構:對象在球衣
@xmlRootelement
ArticleList implements Serializable{
//ArrayList of articles
}
Article implements Serializable
{
User user;
//ArrayList of bids
}
User implements Serializable
{
//Properties
}
Bid implements Serializable
{
//Properties
}
Funcion標題:
@GET
@Path("/article-search")
@Produces(MediaType.APPLICATION_JSON)
public ArticleList articleSearch() {
//Function code here
}
我的球衣函數返回ArticleList。在答案中,我檢查存在與元素的對象出價。
的問題是,在響應JSON是未找到對象出價
響應的示例中的任何元素:
{
"articles":[
{
//Some Props. Here
"user":{
//Some Props. Here
}
//Here list of bids is missing. It is verified that the list contains elements
}
]
}