Skip to content
New issue

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

Jettison fails to setialize a list of beans if bean's name matches its attribute name #4

Open
sberyozkin opened this issue May 14, 2015 · 1 comment

Comments

@sberyozkin
Copy link
Contributor

Jettison fails to serialize a list of beans when bean's name matches one of its attributes' with the first letter capitalized, e.g. bean class TestItem with a field testItem.

Apparently, it fails serializing nested elements with the same name. The following structure:

item

produces:

javax.xml.stream.XMLStreamException: Too many closing tags.
at org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeEndElement(MappedXMLStreamWriter.java:246)
at org.apache.cxf.staxutils.DelegatingXMLStreamWriter.writeEndElement(DelegatingXMLStreamWriter.java:123)
at org.apache.cxf.jaxrs.provider.json.utils.JSONUtils$IgnoreContentJettisonWriter.writeEndElement(JSONUtils.java:255)

However, a single item:

item

is transformed into

{"testItem":{"testItem":"item"}}

normally.

@karendolan
Copy link

Is this solved by #15?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants