Why there is in jackson ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT as a deserialization feature( [] -> null) and not an ACCEPT_EMPTY_OBJECT_AS_NULL_OBJECT ({} -> NULL). Is there a way to achieve this in the current jackson library ?
Asked
Active
Viewed 476 times
1
-
No annotation or configuration for that I am afraid. You may use a custom deserializer as in this [answer](https://stackoverflow.com/a/40366833/1413133) – Manos Nikolaidis Jun 01 '17 at 12:59
-
But i can use deserializers only for the declared classes in the deserializer. I dont think i can implement a base global deserializer, that will be used for any class – Capybara Jun 01 '17 at 15:44