This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes @XMLRootElement, Jersey 1.8 - JSON output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "@XMLRootElement, Jersey 1.8 - JSON output" Watch "@XMLRootElement, Jersey 1.8 - JSON output" New topic
Author

@XMLRootElement, Jersey 1.8 - JSON output

Brian Ata
Greenhorn

Joined: May 22, 2010
Posts: 27
Hi Guys,

I recently upgraded my IDE from Netbeans 7.0.1 to 7.1.1 and it turned out that the new version comes with Jersey 1.8 ( I guess the older one used to have 1.6). Anyway, I have a web service that used to honor my @XMLRootElement(name="xyz") annotation for JSON outputs but after upgrading the jersey, it stopped honoring @XMLRootElement(name="xyz") annotation completely.

I have been searching the posts and came across somebody that has the same problem an got over with wrapping the returned List with a wrapper class, which isn't look good, I mean creating one more object just to force the root element name.

Any help is appreciated,

Thank you..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @XMLRootElement, Jersey 1.8 - JSON output
 
Similar Threads
what is the use of @XmlRootElement
[jersey/jax-rs] json object value string has extra quotes, jsonp, service chaining‏
Jersey client architecture question.
Jersey REST -(Un)Marshaller
RESTFul JSON example.