Using JsonSubTypes on lower level of

I'm attempting to polymorphically deserialise objects from a nested JSON structure over which I have no control. I've been using

@JsonTypeInfo(... include = JsonTypeInfo.As.EXTERNAL_PROPERTY, ...)

but it doesn't work with the case where the POJO type that I need to deserialise to is determined by a property which is an attribute of an object at more than 1 level.

From the JsonTypeInfo.As.EXTERNAL_PROPERTY Javadoc:

"Inclusion mechanism similar to PROPERTY, except that property is included one-level higher in hierarchy"

In my case the discriminating property is one level higher than this in the hierarchy.

Is there any way...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts