On Feb 12, 2009, at 8:13 PM, Tatu Saloranta wrote:
> --- On Thu, 2/12/09, Paul Sandoz <Paul.Sandoz_at_Sun.COM> wrote:
>
>> http://blogs.sun.com/sandoz/entry/jersey_1_0_2_is
>>
>> Paul.
>
> Once again, congratulations!
>
Thanks!
> One quick question on "natural" JSON: is that "truly natural" (as
> in, pretty much the way you'd do it if xml wasn't of concern), or a
> lighter-weight mapping to accomodate for xml bindings?
I would say we have tried to achieve as much of the former as possible
within the context of the JAXB framework while minimizing the
constraints of the latter.
The information JAXB has about JAXB classes (the JAXB module) is used
to reduce artifacts that result from a pure XML infoset-based mapping
occurring in the JSON.
In general we are finding this to be a hard problem because different
developers have different requirements and expectations. For example
some what namespaces represented in JSON, or a way to support
substitution.
In part i think we need to set clear expectations on when to use which
mapping, or when not to use JSON.
> (as opposed to Badgerfish)
> Or put another way: is there a good example/tutorial of expected
> results?
> (apologies if this is part of FAQ, I haven't been following up on
> all discussions on the list)
>
We need to document this better, currently we have:
https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/api/jersey/com/sun/jersey/api/json/package-summary.html
https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/api/jersey/com/sun/jersey/api/json/JSONConfiguration.Notation.html
#NATURAL
Ideally i would like to auto-generate JSON examples from the XSD. As
part of the problem is that the developer does not necessarily
understand what the structure is to document it for consuming or
producing by clients.
Paul.