[Dancer-users] How to un-prettify JSON?

Mr. Puneet Kishor punk.kish at gmail.com
Sun Mar 13 11:21:00 CET 2011


On Mar 13, 2011, at 5:29 AM, Alastair Sherringham wrote:

> Hello,
> 
> I just upgraded from Dancer 1.2 to latest (1.3XX) and my JSON output
> changed from un-pretty to pretty.
> 
> set serializer  => 'JSON';
> get '/products' => sub {
>    return db_products();
> };
> 
> I see the option in the docs but cannot figure out how to use it. In
> "config.yml", I tried :
> 
> engines:
>  JSON:
>    pretty: 0
> 
> But that makes no difference. How do I turn off "pretty"?
> 

I asked the same question on Feb 27, but didn't get any definitive answer. I would also love to "unprettify" the JSON output so it is more compact.

Thanks,

Puneet.



More information about the Dancer-users mailing list