We're trying to deserialize XMLs where the root tag name should determine
which subtype to deserialize to.
Sample XMLs:
<dog>
<name>alpine</name>
</dog>
<cat>
<name>wheezy</name>
</cat>
And we've got the following super class:
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.WRAPPER_OBJECT
)
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = Dog.TYPE),
@JsonSubTypes.Type(value = Cat.class, name = Cat.TYPE),
})
@FreeBuilder
@JsonDeserialize(builder = Animal.Builder.class)
public abstract class Animal {
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Builder extends Animal_Builder {}
}
Is there any way for us to set up our class and JsonTypeInfo and
JsonSubTypes annotations such that we can deserialize XMLs *without* a
wrapping <animal> tag? Looking at
https://groups.google.com/forum/#!msg/jackson-user/CZxDOmVSjGk/TD7L2Rn3FQAJ
it seems like the answer might be no, but I wanted to check before writing
it off.
Thanks,
Jason
--
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.