error when call JSON response |
If you want to return JSON from your controller method you should set JSON to response and return it - https://codeigniter.com/user_guide/outgo...the-output
PHP Code: return $this->response->setJSON($json); Besides, variable $json may be an array (or maybe, it should be) - it is converted automatically to JSON. |
Messages In This Thread |
error when call JSON response - by mylastof - 09-10-2020, 10:14 AM
RE: error when call JSON response - by T.O.M. - 09-10-2020, 11:15 PM
RE: error when call JSON response - by davodm - 01-31-2021, 01:35 AM
RE: error when call JSON response - by hasanbasri93 - 12-18-2022, 04:24 AM
|