users@jersey.java.net

Re: [Jersey] Rid off the _at_at symbol on JSON responses?

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Thu, 10 Dec 2009 22:07:18 +0100

On Thu, Dec 10, 2009 at 07:43:25PM +0100, Felipe Gaścho wrote:
> yes, for me doesn't matter much what framework is the Jersey standard...
>
> the most important point is:
>
> the JSON returned by the default Jersey implementation should be
> consumable by javascript without workarounds :) just that........

The only reason why it does not work this way (attributes still have the ugly @ prefix)
is we want to guarantee backwards compatibility for the existing users.

My intention is to introduce a config property, which would allow
people to switch to the "natural" (JavaScript consumable) JSON notation more easily.

~Jakub

>
> I will try the configuration pointed by Paul, probably it is not much
> to do........
>
> On Thu, Dec 10, 2009 at 7:40 PM, Paul Brown <prb_at_mult.ifario.us> wrote:
> > It would be nice to get Jackson into being more of a first-class
> > citizen in the Jersey world, given that it's liberally licensed (ASL)
> > and under active development.  It is also crazy fast and correct...
> > (Disclosure: I'm a committer on the project...)  What's a good way to
> > do that?
> >
> > 2009/12/10 Felipe Gaścho <fgaucho_at_gmail.com>:
> >> thanks Brown,
> >>
> >> but if I need to add a new framework just to remove the @ then I
> >> prefer to convert the attributes in elements.. then it is
> >> solved........... no extra code needed.............
> >>
> >>  I know there are tons of JSON & XML parsers out there.. but I am
> >> trying to reduce the amount of code to deploy and configure..........
> >> so I am still looking for the Jersey roots :)
> >>
> >> On Thu, Dec 10, 2009 at 6:35 PM, Paul Brown <prb_at_mult.ifario.us> wrote:
> >>> Jackson (http://jackson.codehaus.org) is also an option for hygienic
> >>> JSON; I use it with Jersey with good results.
> >>>
> >>> On Thu, Dec 10, 2009 at 8:21 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> >>>>
> >>>> On Dec 10, 2009, at 3:56 PM, Felipe Gaucho wrote:
> >>>>
> >>>>> What is the simplest way of removing the @ symbol from json responses?
> >>>>
> >>>> That will require switching to the default JAXB/JSON mapped convention to
> >>>> the JAXB/JSON natural convention:
> >>>>
> >>>>  https://jersey.dev.java.net/nonav/documentation/latest/user-guide.html#d4e658
> >>>>
> >>>> Paul.
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Paul Brown
> >>> Multifarious, Inc.
> >>> http://mult.ifario.us
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> ------------------------------------------
> >>   Felipe Gaścho
> >>   10+ Java Programmer
> >>   CEJUG Senior Advisor
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >>
> >>
> >
> >
> >
> > --
> > Paul Brown
> > Multifarious, Inc.
> > http://mult.ifario.us
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> > For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >
> >
>
>
>
> --
> ------------------------------------------
> Felipe Gaścho
> 10+ Java Programmer
> CEJUG Senior Advisor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
http://blogs.sun.com/japod