The only thing is @JsonTypeInfo(defaultImpl=...) which would be used if
nothing is found or matches.

-+ Tatu +-


On Fri, Oct 14, 2016 at 8:01 AM, Benson Margulies <ben...@basistech.com>
wrote:

> Note the fallback if statement here. Is there a way to do an @Type
> that says what to do if nothing else matches?
>
> @Override
> public JavaType typeFromId(DatabindContext context, String id) {
>     KnownAttribute attribute = KnownAttribute.getAttributeForKey(id);
>     if (attribute == null) {
>         attribute = KnownAttribute.UNKNOWN; // extension mechanism,
> build a BaseAttribute.
>     }
>     return context.constructType(attribute.attributeClass());
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jackson-user+unsubscr...@googlegroups.com.
> To post to this group, send email to jackson-user@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to