What causes the invalid JSON error? [closed]

2

I have already done what was said in this post: json_encode - Invalid JSON and has not yet been resolved, so I'm asking.

I'm using the jquery datatables server side. I did the server side activation with the default repository in the datatables_demo table in the same database and everything worked. Now I just changed the table and it generates that error:

  

DataTables warning: table id = example - Invalid JSON response. For more information about this error, please see link

I followed the instructions, debugging on the chrome console, but no preview is available. Why is the JSON Invalid error happening ??? How can I check to correct the error?

PEOPLE HELP ME !!!

WHAT DO I NEED TO DO TO HELP ME ???

Here the response from the server

Mypagecodewiththehtmltable:

<scripttype="text/javascript" language="javascript" class="init">

$(document).ready(function() {
    $('#example').DataTable( {
        "processing": true,
        "serverSide": true,
        "ajax": "scripts/server_processing.php",

        "order": [[ 0, "asc" ]]
    } );
} );

</script>

And server_processing.php :

<?php
$table = 'tbl_medic';
$primaryKey = 'id_Medic';

$columns = array(
    array( 'db' => 'nome', 'dt' => 0 ),
    array( 'db' => 'cidade',  'dt' => 1 ),
    array( 'db' => 'cep',   'dt' => 2 ),
    array( 'db' => 'crm',     'dt' => 3 ),
    array( 'db' => 'email', 'dt' => 4 ),
    array( 'db' => 'pastaDocumentos',     'dt' => 5 )
);

$sql_details = array(
    'user' => '***', //Usuário do banco de dados
    'pass' => '***', //Senha do banco de dados
    'db'   => '***', //Banco de dados
    'host' => 'localhost'
);

require_once( 'ssp.class.php' );
echo json_encode(
    SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
);
    
asked by anonymous 03.07.2017 / 17:00

0 answers