[Jersey] Re: Returned String value is not encoded

From: Gonfi den Tschal <>
Date: Tue, 28 Feb 2012 20:53:30 +0200

sorry for my incorrect statement. i got plain string output also for
json string returns when testing, so i must have had something
misconfigured also.

On Tue, Feb 28, 2012 at 8:37 PM, Tatu Saloranta <> wrote:
> On Tue, Feb 28, 2012 at 10:33 AM, Gonfi den Tschal
> <> wrote:
>> a string is a string, also in json. it makes no sense to wrap that in
>> another object or formatting. it's not xml ;-)
> I disagree. Strings in JSON are quoted, not raw -- plain old String is
> NOT JSON as per specification.
> (in fact, only JSON Object or Array is, strictly speaking)
> Only tokens like 'true', 'false' and 'null', as well as numbers, are
> valid without quoting.
> So this is not wrapping anything, just creating legal JSON.
> -+ Tatu +-