JBoss Community

[RESTEasy] got a trouble when i using jackson-provider.

created by luo zengbin in JBoss Web Services - View the full discussion

i got a trouble when i using jackson-provider.

 

-------java source

@XmlRootElement(name="person")

public class Person{

      String name;

      int age;

      //@XmlElement  getter setter

}

 

-------json result

{

    "name": "AA",

     "age": "100"

}

 

It's missing root level property "person" in the json result.

can you give me same suggestion to get the json result like this.

 

-------wanted json result

{

  "person"{

      "name": "AA",

       "age": "100"

   }

}

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community