users@jersey.java.net

Re: JSON notation in Jersey

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Fri, 04 Apr 2008 11:48:27 +0200

Hi Seamus,

On Fri, Apr 04, 2008 at 11:14:46AM +0200, Seamus Kerrigan (skerriga) wrote:
> Hi,
>
> I've been doing some work with Jersey for the past while but yesterday I
> got to try out Jersey 0.7 and it looks as though Badgerfish notation is
> now the default JSON format again? I found that early Jersey versions

If that is the case, then it is a bug. Could you please provide more details?
Ideally a zip file with your web app ?

> were using Badgerfish by default but 0.6 was using the Mapped notation
> as it's default as outlined in Jakub's blog
> http://blogs.sun.com/japod/entry/better_json_available_in_jersey.
>
> I just have a couple of questions on this JSON formatting:
> - Is Badgerfish likely to be the preferred JSON notation in future
> Jersey releases?

No. Badgerfish is hard to consume.

> - Will XmlAttributes be supported in the Mapped/Mapped-Jettison
> formats?

They are supported already. Only certain cases are not covered well
(see e.g. [1]). If you find out something does not work as expected,
please feel free to submit a new issue and please attach a test case.


> - The blog outlines a method of changing between JSON formats by
> defining a ContextResolver. Is still this valid in 0.7? I gave this a
> very quick try yesterday but was unsuccessful.

It should still work. Could you please provide me with your code
so that i can give it a try?

Thanks,

~Jakub


[1]https://jersey.dev.java.net/issues/show_bug.cgi?id=55
>
> Many thanks,
> Seamus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>