How to create XSD classes for Jackson

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.

    @XmlElement(name = "Dog", type = Dog.class),
    @XmlElement(name = "Cat", type = Cat.class)
protected List<Animal> animal;

Can such courses be offered in Jackson? Specifically, determining the type based on the name of an XML element.

Java is not the same language as JavaScript, Iā€™ve moved your post to general.

1 Like