You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jackson XML fails with following exception when trying to deserialize an empty element with xsi attribute.
<a xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<b/> <!-- works fine -->
<c xsi:nil="false">0920</c> <!-- works fine -->
<d xsi:nil="true"/> <!-- throws exception -->
</a>
public class A {
String b;
String c;
String d;
...
}
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
at [Source: java.io.StringReader@7862f584; line: 4, column: 8] (through reference chain: A["d"])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:854)
at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:62)
at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:256)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3731)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2724)
I tried looking at the code, but couldn't see a straight forward way to fix the issue.
The text was updated successfully, but these errors were encountered:
Jackson XML fails with following exception when trying to deserialize an empty element with xsi attribute.
I tried looking at the code, but couldn't see a straight forward way to fix the issue.
The text was updated successfully, but these errors were encountered: