我可以帮你理解需要添加什么。
JSON:
{"value":{"keyword":"better","correct":"","page":0,"size":10,"cost":51,"total":1107}}
对象类
@JsonAutoDetect
@JsonSerialize(include = Inclusion.NON_NULL)
@JsonRootName(value = "value")
public class Response {
private int page;
private int size;
private int total;
private int cost;
private int result;
private String keyword;
private String correct;
仍然会出现“Servlet.service() for servlet appServlet threw exception”错误
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: 未能识别的属性“value”(),没有标记为可忽略字段