OK, I see...The question is how to wrap a String value. I believe we
discussed it awhile back on the list...
Probably the simplest way to go forward is to create a custom JSON provider
which will extend the default one and in its writeTo it will check if it is
a primitive class and if yes then it will serialize the value as needed,
using some custom convention, otherwise it will delegate to the super
class...

hope it helps, Sergey

On Mon, Mar 8, 2010 at 5:44 PM, DmitryM <[email protected]> wrote:

>
> Sergey
>
> The matter is I'm already JSON provider and expect it to do the job for me.
> As I said, it worked perfectly fine for the second method (not having
> return
> type specified).
> And I would like to keep the methods in sync (as well as the result type,
> which is set to JSON).
>
> I was just wondering why it works okay without return type and doesn't work
> on standard Java types with return type specified.
>
> Dmitry
>
> Sergey Beryozkin-5 wrote:
> >
> > Response.status(resultStatus).type("text/plain").entity("error
> > message").build();
> >
> > rather than expecting primitive types being wrapped ? It can be done but
> I
> > haven't really had a chance to look into it - I do not see what real
> > benefits it will bring
> >
>
> --
> View this message in context:
> http://old.nabble.com/Jax-RS-ExceptionMapper-and-data-marshalling-tp27824429p27824861.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Reply via email to