[Jersey] Re: Returned String value is not encoded

From: Tatu Saloranta <>
Date: Tue, 28 Feb 2012 10:37:10 -0800

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 +-