users@jersey.java.net

RE: [Jersey] Jersey, Json, WCF and Maps

From: Rob - <skyscrapper666_at_hotmail.com>
Date: Tue, 27 Apr 2010 13:38:23 +1030

Makes much more sense. I'll give it a go and keep you guys posted.
 
> Date: Fri, 23 Apr 2010 01:55:14 -0700
> From: tsaloranta_at_gmail.com
> To: users_at_jersey.dev.java.net
> Subject: Re: [Jersey] Jersey, Json, WCF and Maps
>
> On Thu, Apr 22, 2010 at 6:26 PM, Rob - <skyscrapper666_at_hotmail.com> wrote:
> > Please see in-line....
> >
> > You say:
> >
> > {Map:{"entry",{"key":"key1","value":"value1"},"entry",{"key":"key2","value":"value2"},"entry","key":"key3","value":"value3"}.....}}
> >
> > This is not a valid JSON, the Map is not quoted, then after the first
> > "entry", there should be a colon instead of the comma, etc.
> >
> > -->> Yes, a typo from my side. The actual JSON is the following:
> >
> > [{"map":{"entry":{"key":"A","value":"A"},"entry":{"key":"C","value":"C"}}}]
> >
> > What would the output from Jackson be like for a Map<String,String> ?
>
> Depends on exactly what you give, but for simple maps something like:
>
> {"A":"A", "C":"C" }
>
> if you had root-level map with 2 entries.
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
                                               
_________________________________________________________________
If It Exists, You'll Find it on SEEK. Australia's #1 job site
http://clk.atdmt.com/NMN/go/157639755/direct/01/