@Documented @Inherited @Retention(value=RUNTIME) @Target(value={FIELD,TYPE}) public @interface EncodeNullHandlingStrategy
de.bild.codec.PojoCodecProvider.Builder#encodeNullHandlingStrategy(Strategy)
If not set, default is EncodeNullHandlingStrategy.Strategy.CODEC (due to historical behaviour of PojoCodecProvider)
You can e.g. make sure, that lists fields that are null are always encoded as empty lists, if desired.
Right now, two strategies exist:
EncodeNullHandlingStrategy.Strategy.CODEC : If null is found then TypeCodec.defaultInstance() is being used to generate a default value e.g. empty list/set/mapEncodeNullHandlingStrategy.Strategy.KEEP_NULL : keep null| Modifier and Type | Required Element and Description |
|---|---|
EncodeNullHandlingStrategy.Strategy |
value |
public abstract EncodeNullHandlingStrategy.Strategy value
Copyright © 2021 BILD GmbH & Co. KG. All rights reserved.