Open FRosner opened 9 months ago
Bump. I am experiencing the same issue trying to deserialize a Zalando problem to extract the error details.
I believe you have to register your type (using ObjectMapper.registerSubtypes(...)
) as a subtype so that Jackson knows about when when deserializing.
Description
I defined a custom problem
ResourceNotFoundProblem
and I was checking it in my unit test. However, the object mapper failed to deserialize it with the following exception:I don't know why, because I did not provide any
JsonTypeInfo
property. Here's my class definition:And here's a sample to reproduce:
Here's my object mapper.
Expected Behavior
I expect the deserialization to work.
Actual Behavior
The deserialization does not work.
Possible Fix
Not sure what the root cause is. Is this expected to work?
Steps to Reproduce
Context
I can't test my code.
Your Environment