users@jersey.java.net

[Jersey] Re: Jersey hangs when invalid JSON is sent in POST request

From: <setanta.mathews_at_gmail.com>
Date: Wed, 30 Mar 2011 01:28:50 -0700 (PDT)

Hi,



> To fully switch to JSON Jackson support, which would
> work also for a non-JAXB classes, and with simplified
> configuration, you may want to set the JSON POJO mapping
> feature as described at [1]. No JAXBContext resolver
> would be then needed.
>

I tried this approach but found that while it was very easy to marshal
objects to JSON, frequently this JSON could not be unmarshalled back into
the objects. Of course, a solution would be to fix this with jackson
annotations. From my experiences, if you want the client to post back the
JSON and have the server side automatically unmarshal it then sticking with
JAXB is the way to go.

Cheers,

S.



--
View this message in context: http://jersey.576304.n2.nabble.com/Jersey-hangs-when-invalid-JSON-is-sent-in-POST-request-tp6205397p6222315.html
Sent from the Jersey mailing list archive at Nabble.com.