FasterXML / jackson-future-ideas

Repository for SOLE PURPOSE of issue tracker and Wiki for NEW IDEAS. Please: NO BUG REPORTS.
18 stars 6 forks source link

Support setting DeserializationFeature on specific class or field #29

Closed liangde-chen closed 3 years ago

liangde-chen commented 6 years ago

For example I want to enable ACCEPT_FLOAT_AS_INT for specific field but not globally

cowtowncoder commented 6 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.

liangde-chen commented 6 years ago

Setting it on fields is good enough for my use cases.

cowtowncoder commented 3 years ago

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

Anatoly4444 commented 1 year ago

@cowtowncoder could you add READ_UNKNOWN_ENUM_VALUES_AS_NULL to JsonFormat.Feature. Just don't want to make this feature for whole project

cowtowncoder commented 1 year ago

@Anatoly4444 Please file a new issue for jackson-databind (even if annotation change goes in jackson-annotations).