Hi guys,
With the new XStream extension recently added to SVN trunk we could very
easily support both serialization and de-serialization in a transparent way,
for both JSON and XML. It works with the new resource API but could very
easily be ported to our JAX-RS extension!
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~
http://www.restlet.orgNoelios Technologies ~ Co-founder ~
http://www.noelios.com
-----Message d'origine-----
De :
[hidden email] [mailto:
[hidden email]]
Envoyé : mardi 28 avril 2009 16:16
À :
[hidden email]
Objet : Re: JAX-RS and JSon
Hi Fabio,
do you have a special MessageWriter for serializing JAXB annotated objects?
If not (AFAIK ...), the JAX-RS extension uses the JSON capabilities of
Restlet, and there it is easier to serialize than to deserialize. So I've
only implemented the deserialization from every class. As a workaround for
deserialisation you could require type JSONObject as entity type in your
method and work with JSONObjects, and perhaps copy from it.
I'm open for contribution here ...
best regards
Stephan
Fabio Mancinelli schrieb:
> Dear all,
>
> I am successfully using restlet JAX-RS but I noticed that JSON is
> supported out of the box when I return something from a @GET annotated
> method but not when I send some JSON to a @PUT annotated method (wrt
> the same Java types, of course)
>
> What I mean is that the system is capable of serializing from JAXB to
> JSON but not the vice-versa. (I got 415 errors when doing PUTs)
>
> Is it normal or am I doing something wrong?
>
> Thanks,
> Fabio
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=1963982
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=1964393