Support mapping xsi:nil
marked elements as null
s (JsonToken.VALUE_NULL
) · Issue #354 · FasterXML/jackson-dataformat-xml (original) (raw)
Although XML specification does not specify semantics for xsi:nil
(with appropriate namespace), XML Schema specification does, and so some Java XML libraries (including JAXB) support mapping it into null
s.
(there is the related question of generation/writing, but this issue covers only read side).
It would be good if Jackson did same mapping automatically.
For background, see
- Handling XMLElement nillable like JAXB #89 (nil like JAXB)
- Exception on deserializing empty element with an xsi attribute on non String type. #184 (for
BigDecimal
etc values) - Only self-closing tag with 'xsi:nil="true"' can be mapped #293 (nil for Collections)
- Xsi nil in collection fails to deserialize #353 (nil in Collections)