com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize out of START_ARRAY token

转载:http://blog.csdn.net/hikeboy/article/details/71436870




造成该异常的原因

http的服务端对某个客户端不需要的属性加了transient关键字:
private transient byte[] contentByte;

加了该关键字后,返回的json数据虽然没有了contentByte的内容,但是该字段名称依然存在:
“contentByte”:{}
只是结果为空{}

解决方法:
客户端接收返回结果的entity对 contentByte属性加个@JsonIgnore属性即可。

    @JsonIgnore 

    private byte[] contentByte;
  
  
  • 1
  • 2



造成该异常的原因

猜你喜欢

转载自blog.csdn.net/kevinWang2016/article/details/79556516