com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize out of START_ARRAY token
2017-05-08 22:43
621 查看
造成该异常的原因:
http的服务端对某个客户端不需要的属性加了transient关键字:
private transient byte[] contentByte;
加了该关键字后,返回的json数据虽然没有了contentByte的内容,但是该字段名称依然存在:
“contentByte”:{}
只是结果为空{}
解决方法:
客户端接收返回结果的entity对 contentByte属性加个@JsonIgnore属性即可。
http的服务端对某个客户端不需要的属性加了transient关键字:
private transient byte[] contentByte;
加了该关键字后,返回的json数据虽然没有了contentByte的内容,但是该字段名称依然存在:
“contentByte”:{}
只是结果为空{}
解决方法:
客户端接收返回结果的entity对 contentByte属性加个@JsonIgnore属性即可。
@JsonIgnore private byte[] contentByte;
相关文章推荐
- com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize out of START_ARRAY token
- nested exception is com.fasterxml.jackson.databind.JsonMappingException: Conflicting getter definiti
- com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
- zeppelin spark interpreter异常 com.fasterxml.jackson.databind.JsonMappingException
- com.fasterxml.jackson.databind.JsonMappingException:No suitable constructor found for type
- 解决com.fasterxml.jackson.databind.JsonMappingException: No suitable 以 Jackson 处理复杂类型(List,map)两种方法
- com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class ...
- com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.apache.ibati
- com.fasterxml.jackson.databind.JsonMappingException
- com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0xc9
- java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonProcessingException
- 升级SpringMVC4.2.5 com/fasterxml/jackson/core/JsonProcessingException
- springmvc json com.fasterxml.jackson.core.JsonProcessingException
- java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonProcessingException
- nested exception is java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonGenerator.writeStart
- Springmvc4 com/fasterxml/jackson/core/JsonProcessingException
- Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ('true', 'false' or 'null')
- ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper的解决办法
- com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ExceptionId"
- SpringMVC转换Json 出错.java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.type.