How to create XSD classes for Jackson.
XML / XSL
1
Posts
1
Posters
13
Views
1
Watching
-
Jackson does not provide a tool for generating Jackson classes from XSD or JSON, as JAXB does for a specific XSD. The JAXB class generator was used to generate a set of classes for the specified XSD schema. For polymorphic types, for example, JAXB provides the following annotation to identify the name based on the name of an XML element.
@XmlElements({
@XmlElement(name = "Dog", type = Dog.class),
@XmlElement(name = "Cat", type = Cat.class)
})
protected List animal;Can such courses be offered in Jackson? Specifically, determining the type based on the name of an XML element.