The current extensibility point for all typing information is TypeDeserializer which has a lot of responsibilities.
I want to implement custom logic to determine the type id for an object even when the type information is not included in the input stream.
In order to accomplish this currently i had to extend AsPropertyTypeDeserializer with deserializeTypedFromArray() and several protected methods overridden.
It would be very useful to have an interface similar to the scope of TypeIdResolver to determine what the type id is for the current object.
This isolation of responsibilities allows for customization of the instance type determination while still leveraging the logic in classes such as AsPropertyTypeDeserializer.
This interface would encapsulate the logic currently implemented in AsArrayTypeDeserializer. _locateTypeId().
The interface method signatures could follow the lines of
public String getTypeId(JsonParser jp, DeserializationContext ctxt)
and
public String getTypeId(JsonParser jp, DeserializationContext ctxt, JavaType defaultType)
The current extensibility point for all typing information is TypeDeserializer which has a lot of responsibilities.
I want to implement custom logic to determine the type id for an object even when the type information is not included in the input stream.
In order to accomplish this currently i had to extend AsPropertyTypeDeserializer with deserializeTypedFromArray() and several protected methods overridden.
It would be very useful to have an interface similar to the scope of TypeIdResolver to determine what the type id is for the current object.
This isolation of responsibilities allows for customization of the instance type determination while still leveraging the logic in classes such as AsPropertyTypeDeserializer.
This interface would encapsulate the logic currently implemented in AsArrayTypeDeserializer. _locateTypeId().
The interface method signatures could follow the lines of
public String getTypeId(JsonParser jp, DeserializationContext ctxt)and
public String getTypeId(JsonParser jp, DeserializationContext ctxt, JavaType defaultType)