Closed liangde-chen closed 3 years ago
This would probably doable for fields via @JsonFormat
and JsonFormat.Feature
. For classes it may not be easy to allow because semantics would differ from usual per-type cases in which configuration is for handling of value of given type, but here I assume expectation would be as default for float
/double
valued properties instead.
Setting it on fields is good enough for my use cases.
I am open to specific additions of new JsonFormat.Feature
settings: please feel free to file specific individual requests against jackson-databind
. Will close this general request
@cowtowncoder could you add READ_UNKNOWN_ENUM_VALUES_AS_NULL to JsonFormat.Feature. Just don't want to make this feature for whole project
@Anatoly4444 Please file a new issue for jackson-databind
(even if annotation change goes in jackson-annotations
).
For example I want to enable ACCEPT_FLOAT_AS_INT for specific field but not globally