> -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Friday, November 01, 2013 3:39 AM > To: [email protected]; KARR, DAVID > Subject: Re: Configure json to give array of foo objects instead of array of > objects with key of "foo" and value of foo object? > > Hi David, > On 31/10/13 23:30, KARR, DAVID wrote: > > I'm working with some people who had some trouble configuring both xml and > json output in Jersey, and I wanted to see how their particular problem could > be resolved in CXF. I haven't had to deal with the particular problem they > had, and a quick search of the docs didn't give me an answer. > > > > In short, they were hoping to get a json structure like the following: > > > > {..., [{"prop1": prop1, "prop2": prop2},...], ...} > > > > Where the objects in the array are "Foo" objects. > > > > What they got was this: > > > > {..., [{"foo": {"prop1": prop1, "prop2": prop2}},...], ...} > > > > So instead of the "Foo" object, they got a wrapper object whose key is > "foo", and the value is the "Foo" object. Is it practical to configure > Jettison in CXF to do this? > > > I need to see a sample JAXB bean and experiment with it, there are quite > a few ways to affect the Jettison output now, but I'd like to see how > the actual bean. > > It is possible now to do only say > "[{"prop1": prop1, "prop2": prop2},...]" > > but I'm not sure if having such an array alongside other sibling > properties is possible yet
I'm still waiting for more detail from them on the detailed issues they were seeing, but in the meantime can you give me some hints on how I make these kinds of changes, without knowing exactly what we're going to be doing yet?
