-
-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Hi.
I'm using <jackson-bom.version>2.17.2</jackson-bom.version>
and already resolved my problem with Date
using this configuration #561 (comment) .
Now what I want is to convert:
<x><TESTO></TESTO></x>
to the field:
@JsonProperty( "TESTO" )
private String testo;
and when the text is empty what I want is to have null
in testo
field.
What I already tried is all the combinations of:
XmlMapper mapper = new XmlMapper();
mapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
mapper.coercionConfigFor( LogicalType.Textual ).setCoercion( CoercionInputShape.EmptyString, CoercionAction.AsNull );
I also tried adding:
mapper.coercionConfigDefaults().setCoercion( CoercionInputShape.EmptyString, CoercionAction.AsNull);
Then I tried to debug but it seams that coercion
is not used.
Any idea?
Thanks alot
Metadata
Metadata
Assignees
Labels
No labels