I want to deserialize a class that comes from an external dependency using jackson and have below constraints.
- I cannot add any annotations to the class that is to be deserialized as it comes from an external dependency and not editable.
- I checked JacksonMixInAnnotations (https://github.com/FasterXML/jackson-docs/wiki/JacksonMixInAnnotations) however that needs writing a custom object mapper. But I have around 40 dependencies and writing a custom object mapper for each of them seems like a messy option.
- I looked into https://github.com/FasterXML/jackson-databind/issues/2852 where
.setConstructorDetector(ConstructorDetector.PROPERTIES)
is recommended. I need to try this out.
Has anyone solved this problem before? What is the best recommendation here?
Thank you.