Hi Nick,
please see in-line…
On Jul 29, 2013, at 7:50 PM, Nick Khamis <symack_at_gmail.com> wrote:
> On 7/29/13, Jakub Podlesak <jakub.podlesak_at_oracle.com> wrote:
>> Hi Nick,
>>
>> Please see the list of required dependencies at [1].
>>
>> MOXy JSON feature configuration should be described at [2],
>> i.e. when you add jersey-media-moxy and it's dependencies to your
>> class-path, the MOXy JSON support should be turned on automatically.
>>
>> HTH,
>>
>> ~Jakub
>>
>> [1]https://jersey.java.net/project-info/2.1/jersey/project/jersey-media-moxy/dependencies.html
>> [2]https://jersey.java.net/documentation/latest/media.html#json.moxy
>>
>> On Jul 26, 2013, at 6:47 PM, Nick Khamis <symack_at_gmail.com> wrote:
>
>
> Hello Jakub,
>
> I would really like to stay updated and use the new JSON-P
> functionality for automatic JSON de/serialization. I did see [1]
> however, I was not able to understand how it would add the JSON
> functionality?
Please look at
https://jersey.java.net/documentation/latest/media.html#json
i hope the thing is well described there.
JSON POJO support is not part of JAX-RS 2.0,
but Jersey provides a few JSON providers out-of the box.
The MOXy provider, one of the JSON providers, is preferred and
could be auto configured just by being present at the application class-path.
Although you can still use the above described explicit configuration.
I guess it would be best if you can check the following Jersey JSON examples:
https://github.com/jersey/jersey/tree/master/examples/json-moxy
https://github.com/jersey/jersey/tree/master/examples/json-jackson
https://github.com/jersey/jersey/tree/master/examples/json-jettison
https://github.com/jersey/jersey/tree/master/examples/json-processing-webapp
https://github.com/jersey/jersey/tree/master/examples/json-with-padding
>
> Could someone please help? Our client side will be pure html, the
> server side is using
> `javax.ws.rs.core.Application`. What is all this stuff for JSON (i.e.,
> jettison, jackson, jsonp, moxy..... )
As mentioned above, Jersey provides a few JSON providers out-of-the box.
It is up to you which one suits you best.
>
> Is it possible to get rid of this error: "MessageBodyWriter not found
> for media type=application/json", using the JSON-P implementation
> found in [2]?
You need to configure a suitable JSON provider. Please check out
the examples above. I think it will be the most helpful.
Kind regards,
~Jakub
>
> [1] http://www.adam-bien.com/roller/abien/entry/configuring_jax_rs_2_01
> [2] https://jersey.java.net/project-info/2.1/jersey/project/jersey-media-json-processing/dependencies.html