You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Christian Sprecher <ki...@gmail.com> on 2012/01/02 14:10:20 UTC
json: keys are not strings?
Hi all
According to http://www.json.org/, the keys in JSON should be strings, i.e.
double quoted, which Sling doesn't provide ootb. What is the best strategy
to correct this? Is it possible to overwrite the default behaviour?
Cheers
Chris
Re: json: keys are not strings?
Posted by Christian Sprecher <ki...@gmail.com>.
Hi Sam
You are right: I did have a look at my CRX instance, Sling6 outputs correct
json, my bad.
Cheers
Chris
On Mon, Jan 2, 2012 at 3:07 PM, sam ” <sk...@gmail.com> wrote:
> sling json servlet outputs valid json.
> your custom servlet might not.
>
> do you have an example url where sling outputs invalid json?
>
>
> On Mon, Jan 2, 2012 at 8:10 AM, Christian Sprecher <kindofwhat@gmail.com
> >wrote:
>
> > Hi all
> >
> > According to http://www.json.org/, the keys in JSON should be strings,
> > i.e.
> > double quoted, which Sling doesn't provide ootb. What is the best
> strategy
> > to correct this? Is it possible to overwrite the default behaviour?
> >
> > Cheers
> >
> > Chris
> >
>
Re: json: keys are not strings?
Posted by sam ” <sk...@gmail.com>.
sling json servlet outputs valid json.
your custom servlet might not.
do you have an example url where sling outputs invalid json?
On Mon, Jan 2, 2012 at 8:10 AM, Christian Sprecher <ki...@gmail.com>wrote:
> Hi all
>
> According to http://www.json.org/, the keys in JSON should be strings,
> i.e.
> double quoted, which Sling doesn't provide ootb. What is the best strategy
> to correct this? Is it possible to overwrite the default behaviour?
>
> Cheers
>
> Chris
>