We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAXB allows you to override the name of the root element (using @XmlRootElement when generating XML. For example, rendering this class to XML:
@JsonIgnoreProperties( {"meal", "notMeal", "mealNameDisplay"} ) public class MealEvent...
Generates XML like this:
But I'd like the root element to be 'meal' instead of 'MealEvent'.
FWIW, I tried the wild guess using @JsonTypeName( "meal" ) as well – it had no effect.
In this discussion Tatu suggested the annotation @JacksonXmlRootName.
The text was updated successfully, but these errors were encountered:
Implemented: now there is @JacksonXmlRootElement (named similar to JAXB annotation, just with "Jackson" prefix to reduce confusion).
Sorry, something went wrong.
No branches or pull requests
(note: re-creation of [http://jira.codehaus.org/browse/JACKSON-452] by Chris Winters)
JAXB allows you to override the name of the root element (using @XmlRootElement when generating XML. For example, rendering this class to XML:
@JsonIgnoreProperties( {"meal", "notMeal", "mealNameDisplay"} )
public class MealEvent...
Generates XML like this:
lunch ...But I'd like the root element to be 'meal' instead of 'MealEvent'.
FWIW, I tried the wild guess using @JsonTypeName( "meal" ) as well – it had no effect.
In this discussion Tatu suggested the annotation @JacksonXmlRootName.
The text was updated successfully, but these errors were encountered: