com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize out of START_ARRAY token
2018-03-14 16:27
1016 查看
转载:http://blog.csdn.net/hikeboy/article/details/71436870
造成该异常的原因:
http的服务端对某个客户端不需要的属性加了transient关键字:
private transient byte[] contentByte;
加了该关键字后,返回的json数据虽然没有了contentByte的内容,但是该字段名称依然存在:
“contentByte”:{}
只是结果为空{}
解决方法:
客户端接收返回结果的entity对 contentByte属性加个@JsonIgnore属性即可。
2
造成该异常的原因:
http的服务端对某个客户端不需要的属性加了transient关键字:
private transient byte[] contentByte;
加了该关键字后,返回的json数据虽然没有了contentByte的内容,但是该字段名称依然存在:
“contentByte”:{}
只是结果为空{}
解决方法:
客户端接收返回结果的entity对 contentByte属性加个@JsonIgnore属性即可。
@JsonIgnore private byte[] contentByte;1
2
相关文章推荐
- com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize out of START_ARRAY token
- com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
- com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class ...
- zeppelin spark interpreter异常 com.fasterxml.jackson.databind.JsonMappingException
- com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.apache.ibati
- com.fasterxml.jackson.databind.JsonMappingException
- 解决com.fasterxml.jackson.databind.JsonMappingException: No suitable 以 Jackson 处理复杂类型(List,map)两种方法
- nested exception is com.fasterxml.jackson.databind.JsonMappingException: Conflicting getter definiti
- com.fasterxml.jackson.databind.JsonMappingException:No suitable constructor found for type
- com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ExceptionId"
- Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ('true', 'false' or 'null')
- java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
- java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonProcessingException
- ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper的解决办法
- java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
- SoapUI 调用 CXF的restful形式接口服务异常:com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byt
- springMVC出现com/fasterxml/jackson/core/JsonProcessingException
- jackson json转实体 com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException
- com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0xc9
- java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException