Skip to main content

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:Custom PoolDataSource - How to change in EclipseLink
Next Topic:Exception when updating object from outside of transaction
Goto Forum:

Current Time: Fri Jun 22 09:42:46 GMT 2018

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

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

Back to the top