users@jersey.java.net

[Jersey] Re: how to rename XmlRootElement in JSON

From: Maxrunner <joao.rossa_at_gmail.com>
Date: Mon, 30 May 2011 07:45:30 -0700 (PDT)

This is what i get using the Map example, still the same problem, i get the
name "ListWrapperWithMap" which i dont want, if i can hide this name and let
only the "Organicas" name remain seems like a good idea for returning list
of objects with the name i want....

{
  "ListWrapperWithMap" : {
    "Organicas" : [ {
      "designacao" : null,
      "dataAlteracao" : "2010-12-23",
      "id" : 123,
      "active" : true
    }, {
      "designacao" : "Organica Mind",
      "dataAlteracao" : "2000-05-21",
      "id" : 124,
      "active" : false
    }, {
      "designacao" : "Organica Strength",
      "dataAlteracao" : "2002-12-23",
      "id" : 125,
      "active" : true
    }, {
      "designacao" : "Organica Stamina",
      "dataAlteracao" : "2011-06-14",
      "id" : 126,
      "active" : true
    }, {
      "designacao" : "Organica Luck",
      "dataAlteracao" : "2006-02-01",
      "id" : 127,
      "active" : false
    }, {
      "designacao" : "Organica Love",
      "dataAlteracao" : "2003-04-07",
      "id" : 128,
      "active" : false
    } ]
  }
}

--
View this message in context: http://jersey.576304.n2.nabble.com/how-to-rename-XmlRootElement-in-JSON-tp6173292p6419404.html
Sent from the Jersey mailing list archive at Nabble.com.