How to return pure json |
Hello,
I want to respond with json without spaces or line breaks. This is because the size of the large json grows unnecessarily. PHP Code: public function testapi() response Code: { Is there a good way?
Have you tried with your environment set to production? It looks like it will not "pretty print" json in production. I don’t know if there’s a way to change this.
https://github.com/codeigniter4/CodeIgni...er.php#L65
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Welcome Guest, Not a member yet? Register Sign In |