[dancer-users] json true/false

Andrew Beverley andy at andybev.com
Mon Jan 26 11:58:22 GMT 2015

On Mon, 2015-01-26 at 12:22 +0100, Hugues wrote:
> I need to retun a json to my AngulasJS app come from my MySQL database
> but my json return "false" instead of false and "true" instead of true
> or 0/1 instead of true/false

You need to use a reference to 0 or 1 for it to be converted to a JSON
boolean. For example:

        string  => "some string",
        boolean => \1,            # This will be converted to true

More information about the dancer-users mailing list