users@jersey.java.net

[Jersey] Re: Unmarshalling JSON into POJO collections

From: Paul O'Fallon <paul_at_ofallonfamily.com>
Date: Tue, 19 Aug 2014 18:05:23 -0400

You could try switching from MOXy to Jackson (leaving the above code the
same) and see if that makes a difference. I have code in a JerseyTest
which looks almost identical to yours and it works (with Jackson, anyway).
 In the past I've had some seemingly trivial serialization code that didn't
work with MOXy but worked as soon as I switched to Jackson.

- Paul


On Tue, Aug 19, 2014 at 5:37 PM, John Brooks <iresprite_at_gmail.com> wrote:

> Honestly, I'm happy to consider other solutions if they work! I picked
> MOXy primarily because the documentation indicated it was the default and
> preferred way of handling JSON. I don't mind taking a step back and
> approaching it via Jackson or JAXB. Could either of you point me at some
> good working examples?
>
> Thanks again!
> John
>
>
> On Tue, Aug 19, 2014 at 5:23 PM, cowwoc <cowwoc_at_bbs.darktech.org> wrote:
>
>> Same with Jackson, but I think John is looking for a MOXY-specific
>> solution so this doesn't help him.
>>
>> Gili
>>
>>
>> On 19/08/2014 5:14 PM, Guy Rouillier wrote:
>>
>>> We are using JAXB to serialize and deserialize annotated classes. Works
>>> well with single objects as well as list of objects. Also works equally
>>> well with XML and JSON.
>>>
>>> On 8/19/2014 2:29 PM, John Brooks wrote:
>>>
>>>> I've been banging around on this some more and coming up with no
>>>> progress (including posting to StackOverflow
>>>> <http://stackoverflow.com/questions/25310759/deserializing-json-with-
>>>> jersey-and-moxy-into-a-list-collection>),
>>>> so I'm wondering if it's time to come up with a new approach. How do
>>>> other folks here deserialize JSON into collections?
>>>>
>>>> Cheers!
>>>> John
>>>>
>>>
>>>
>>>
>>
>