Hi everyone,

I'm a total CXF newbie and want to setup a JAX-RS service to use with the DOJO JsonRestStore. ATM I'm using CXF 2.2.2.

Is there a way to configure the JSON marshalling not to insert a root element? I found out about the JsonWriter.DROP_ROOT_MODE parameter:

"Therefore it is possible to drop this root by initializing the internally used JsonWriter in a different mode." [1]

  new JsonWriter(writer, JsonWriter.DROP_ROOT_MODE);

Is it possible to configure CXF so that the JsonWriter is initialized with this parameter?


I have already read the thread "JSON in CXF - root element dropped", but it looks like I'd have to work with the trunk and make myself familiar with some CXF internals. Is there an easier way to achieve this?

Thanks a lot in advance for any hints!

[1] http://xstream.codehaus.org/json-tutorial.html

-- Andreas

--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01

Reply via email to