• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
return an unescaped json

#1
Hi, i have some strings like 
Quote:["000"]
and with the classic $this->respond($mydata, 200) i can't unescape this. the json output is always "[\"000\"]"
I've also try
PHP Code:
    return $this->response->setStatusCode(200)
    ->setHeader('Content-Type''application/json')
    ->setBody(json_encode($mydataJSON_UNESCAPED_SLASHES)); 
but the result is the same.

Any suggestion?
Thanks in advance
Reply

#2
Hi, check your app\Config\Format, that's where you find the formatter for the built in json encoder. And tweak it there.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.