Server-side processing invalid json
Server-side processing invalid json
Hi everyone.
I'm running datatables server-side script (php), just like in the tutorial http://datatables.net/examples/data_sources/server_side.html
But it's not working yet...
I already checked my script searching for errors.
- PDO Connection Ok
- Trying to see the json returned, i can get the 'recordsTotal' parameter and its value, but not the 'data' parameters (always empty).
- Datatables debug: http://debug.datatables.net/asabuf
May you guys find some error to help me here with the script ?
Thanks a lot.
Answers
There is no reply from the server, which is not valid JSON, hence the error message. I would suggest checking your server's error logs.
Allan
Thanks for the reply Allan, i think i just found.
Some results returned from server-side has non-utf8 chars, so breaks the JSON.
Example: '[6] => Papa Jo�o Paulo I'
This register breaks json, right ?
I'm looking for some solution to it. Do you know some workaround for special chars/non utf-8 returned from server?
Thanks !
Ok, i fixed non-utf8 characters.
Now i just would like to know: Is it possible to add a new column called 'Options', with some actions like (edit/delete) ?
Thanks Allan!
http://datatables.net/examples/api/select_single_row.html
:D