Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Include json.root element as a @type attribute
Include json.root element as a @type attribute [message #1322363] Tue, 29 April 2014 20:36
greg Mising name is currently offline greg Mising nameFriend
Messages: 3
Registered: July 2009
Junior Member

Is there any way to "tell" moxy to always append class type information when marshaing java object to JSON i.e.
class Customer{
  private String name;

I'd like to be marshalled to:

I don't want to set "eclipselink.json.include-root" property on my marshaller as it creates hierarchy in the JSON text (see below). Instead of that i'd like it to be replaced with an attribute. The interesting thing is that should my example class extended some arbitrary class e.g. MyDummy.class then the output JSON would include @type node


Previous Topic:Unmapped Columns in ResultSet
Next Topic:Problem removing directory with database
Goto Forum:

Current Time: Sat Jan 20 19:17:34 GMT 2018

Powered by FUDForum. Page generated in 0.01875 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software