[dancer-users] json true/false

Hugues hugues at max4mail.com
Mon Jan 26 11:22:03 GMT 2015


Hello
use dancer 1.3132
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

my @todo   = database()->quick_select('ToDo',{ userId => $userId 
},{limit => 50} );
return \@todo;

I try binay fields, varchar fields, bool fields ( return 0/1), tinyint( 0/1)

do you have a idea ? or I need to parse @todo and change by myself ?



[
    {
       "Completed" : "false",
       "Id" : "11",
       "UserId" : "1",
       "Tache" : "my 1st task"
    },
    {
       "Completed" : "true",
       "Id" : "12",
       "UserId" : "1",
       "Tache" : "aller chercher le chien"
    },
  ]




More information about the dancer-users mailing list