You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrating an application from resteasy-jettison-provider to resteasy-jackson2-provider, but need to retain the JSON format. Can't configure JaxbAnnotationIntrospector to properly handle the case of @XmlElementWrapper + @XmlElement together. Depending on MapperFeature.USE_WRAPPER_NAME_AS_PROPERTY_NAME, it either uses one or the other, but not both. Jettison's default behavior is to use both.
Example:
@XmlRootElement(name = "Parent")
public class Parent {
private List<Child> children = new LinkedList<>();
@XmlElementWrapper(name = "Children")
@XmlElement(name = "Child")
public List<Child> getChildren() {
return children;
}
public void setChildren(List<Child> children) {
this.children = children;
}
}
Migrating an application from resteasy-jettison-provider to resteasy-jackson2-provider, but need to retain the JSON format. Can't configure JaxbAnnotationIntrospector to properly handle the case of
@XmlElementWrapper
+@XmlElement
together. Depending on MapperFeature.USE_WRAPPER_NAME_AS_PROPERTY_NAME, it either uses one or the other, but not both. Jettison's default behavior is to use both.Example:
Using Jettison:
Using JaxbAnnotationIntrospector with MapperFeature.USE_WRAPPER_NAME_AS_PROPERTY_NAME enabled:
Using JaxbAnnotationIntrospector with MapperFeature.USE_WRAPPER_NAME_AS_PROPERTY_NAME disabled:
Test:
https://bitbucket.org/alexlitovsky1/jaxb-annotations-bug/
The text was updated successfully, but these errors were encountered: