Try this:
@XmlValue
String key;
-W
On Thu, Sep 17, 2009 at 7:11 PM, hairman <sunti_online_at_hotmail.com> wrote:
>
> Hi!
> I didn't find an example and don't know how to search for the solution.
>
> These annotations "generate" the following JSON:
> @XmlRootElement
> public class Object {
> String key;
> ...
> }
>
> { "object" :
> {
> "key" : "value"
> }
> }
>
>
> But how do I annotate the class to produce such a JSON:
> {
> "key" : "value"
> }
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Simple-%28-%29-question-concerning-JSON-root-Object-tp25492007p25492007.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>