dev@jersey.java.net

Re: [Jersey] Jersey 1.0.2 released

From: Tatu Saloranta <cowtowncoder_at_yahoo.com>
Date: Tue, 17 Feb 2009 10:23:28 -0800 (PST)

--- On Tue, 2/17/09, Paul Sandoz <Paul.Sandoz_at_Sun.COM> wrote:

...
> > So I like many things in JAXB per se; but the baggage
> of xml compatiblity (including using stax API which likewise
> is not a good match with json) is the problem.
>
> I would say not a perfect match :-)

Fair enough! :)

> My hope is that we may have hit a reasonably 80% mark, but
> we need some more data to ascertain that. I want to compare
> XML to the "natural" JSON to badger fish JSON for
> a complex piece of XML, say using UBL purchase orders.

I would be interested in helping with this. Can you point me to a sample document or two (plus if need be, specs)?
I wouldn't mind creating a conversion (depending on complexity, either manual or automated)

My interest here relates to "StaxBind" data format benchmark I have written -- it's neat for comparing data formats, libs, for different payloads; but I need more general purpose sample data. There isn't that much available, so I have converted some xml sample docs using convention-based transforms
(we can take this discussion off-line; anyone interested let me know and I can give more details, but it gets bit offtopic here)

...
> > Perhaps that's to be handled with body handlers?
>
> It can, because the media types are different. IIUC Java
> YAML supports any Java type for serialization, i am
> surprised there is not something for JSON that does
> something similar.

There are actually. :)

I know Jackson does full serialization/deserialization (with annotation support with 0.9.8), and I think google-gson does too (according to their docs, haven't tried using it)
And I think "json tools" may have support for this as well -- bit hard to judge by documentation.
These are all fairly recent developments though, so there may be issues with maturity. But at least there is progress, which was lacking up until maybe 9 months ago.

JAXB (and XStream too) was an inspiration for jackson's data binding; and I am hoping to even support use of subset of JAXB annotations.
So there is definitely some synergy in there.

> We may need something a little extra to place nice with
> multiple JSON conventions for JAXB objects, when not using
> the JAXB infrastructure.

Yes.

-+ Tatu +-