Welcome Guest, Not a member yet? Register   Sign In
Debug is breaking my JSON... How to disable it from some methods ?
#1

(This post was last modified: 10-07-2019, 07:12 PM by Poetawd.)

Hi everyone !

The debug is breaking my JSON return....

Since my app is heavily based on JSON returns, I decided to keep it in a view file.

The problem is that CI is adding a html comment on it !

PHP Code:
    public function jsonFormAdd()
    {

        
$data = array();

        
$returnView view('ExpAdmin/ExpData/Candidates/Json/formAdd'$data);

        return 
$this->response->setJSON($returnView);

    } 

 The json:

Code:
<!-- DEBUG-VIEW START 1 APPPATH/Config/../Views/ExpAdmin/ExpData/Candidates/Json/formAdd.php -->
[{"tabs":false,"titulo":"Adicionar Candidate","method":"post","botoes":true,"id":"novoCandidate","action":"candidates\/processa_formulario_adicao","csrf":0,"csrf_name":0,"classes":["form_input","input"],"sections":[{"fields":[{"tipo":1,"name":"stName","legenda":"Name","ajuda":"Full Name","classes":"","required":true},{"tipo":1,"name":"stEmail","legenda":"Email","ajuda":"","classes":"email ","email":1,"required":true},{"tipo":1,"name":"stAddressOne","legenda":"Address 1","ajuda":"","classes":"","required":true},{"tipo":1,"name":"stAddressTwo","legenda":"Address 2","ajuda":"","classes":""},{"tipo":1,"name":"stCity","legenda":"City","ajuda":"","classes":"","required":true},{"tipo":1,"name":"stPostalCode","legenda":"Postal Code","ajuda":"","classes":""},{"tipo":1,"name":"stCountry","legenda":"Country","ajuda":"","classes":""},{"tipo":1,"name":"stPhone","legenda":"Phone","ajuda":"","classes":""}]}]}]
<!-- DEBUG-VIEW ENDED 1 APPPATH/Config/../Views/ExpAdmin/ExpData/Candidates/Json/formAdd.php -->

How to disable the toolbar there ? Thank you !
Reply


Messages In This Thread
Debug is breaking my JSON... How to disable it from some methods ? - by Poetawd - 10-07-2019, 07:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB