I'm given a configured jackson's ObjectMapper
instance with some modules, deserializers and configurations applied.
Also I have an "flat" json, meaning either no inner nodes, or ObjectMapper
is able to parse that inner nodes to an single object.
I want to parse given json to Map<String, Object>
(property name - deserialized object). Expected classes for each json property name are known, so I could pass them as Map<String, Class<?>>
. How could I archive that target?
It's like parsing with jackson.reader().fotType(Pojo.class).readValue()
to pojo and then collecting pojo fields with reflection. But I want to avoid extracting pojo's class, avoid using reflection and get in resulting Map only present in json properties.