users@jersey.java.net

[Jersey] Re: Marshall Exception with linked JAXB exception when sending a map with a list

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Mon, 17 Oct 2011 13:07:38 +0200

Hi,

On 13.10.2011 16:50, reaganej_at_gmail.com wrote:
> Thanks Jakub,
> I am working on getting a test case finished and ready. Should

O.K.

> be done soon. Also I don't know if helps, but I am only having this
> problem when I try and do a PUT request and send my Map<Object,
> Map<..,..>> to the server. If I do a straight GET request or a PUT that
> returns a Map<Object, Map<..,...>> then everything works fine.

Maybe your client code glitch?

> As a side question, is there a way to force Jersey to send an
> object as JSON. I know you can
> (WebApplication).accept("application/json") to accept JSON but what
> happens when I want to send JSON?

you set the content-type header with:
webResource.type("application/json").put(...);

~Jakub

>
> Again I expect to have the test case working and up today.
>