Hi, I'm implementing a REST API with json in GlassFish 3.1.2.2. What
json implementation does this GF release bundle?
I'm running into issues where my json output doesn't match my json
schema. I believe the issues will be resolved if I can enable the
"natural" notation.
There are a few blogs out there that explain how to tweak generated
schema for moxy and jersey, and I'm not sure which apply.
There is a blog from Blaise saying moxy became Jersey's/GF's default
jaxb implementation in GF 3.2, which I believe was never released and
became GF 4. Or did it get backported to GF 3.1.2.2?
Adding to my confusion is a stacktrace from GlassFish that I'm currently
investigating that ends in:
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
com.sun.jersey.moxy.MoxyMessageBodyWorker
com.sun.jersey.moxy.MoxyListMessageBodyWorker
jersey json? Jackson? Moxy? (This is plain GlassFish, I did not add any
libraries.)
Also, is there a system property or other external way to tweak the json
output (like enabling natural json) that does not involve adding a
dependency on com.sun.jersey classes in my Java EE application?
If not, is there a way to enable natural json like in the blog below
(writing a JAXBContextResolver that returns a JSONJAXBContext) that does
not involve listing all my domain classes)?
http://tugdualgrall.blogspot.com.au/2011/09/jax-rs-jersey-and-single-ele
ment-arrays.html
Thanks!
Regards,
Dies Koper