DataTables warning: JSON data from server could not be parsed
DataTables warning: JSON data from server could not be parsed
Hey guys! I hope someone can help me with this...
I have a table that it's loading the data normally, but I still receive this parse error:
DataTables warning (table id = 'datat'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
I have no ideia why, here is my table:
[code]
jQuery(function($){
$('#datat').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "get_json.php",
"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0, 5 ] }
],
"oLanguage": {
"sLengthMenu": "_MENU_ emails por página"
}
} ).fnSort( [ [1,'desc'] ] );
})
Índice
Assunto
De
Status
[/code]
And here is the json server received (seems correct to me):
[code]{"sEcho":2,"iTotalRecords":"2","iTotalDisplayRecords":"2","aaData":[["","2","Tenha o Gmail em seu dispositivo m\u00f3vel","Equipe do Gmail ","Criado","<\/i><\/a>"],["","1","Dicas para usar o Gmail","Equipe do Gmail ","Criado","<\/i><\/a>"]]}[/code]
The headers are also with the correct mime type. Any ideias?
I have a table that it's loading the data normally, but I still receive this parse error:
DataTables warning (table id = 'datat'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
I have no ideia why, here is my table:
[code]
jQuery(function($){
$('#datat').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "get_json.php",
"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0, 5 ] }
],
"oLanguage": {
"sLengthMenu": "_MENU_ emails por página"
}
} ).fnSort( [ [1,'desc'] ] );
})
Índice
Assunto
De
Status
[/code]
And here is the json server received (seems correct to me):
[code]{"sEcho":2,"iTotalRecords":"2","iTotalDisplayRecords":"2","aaData":[["","2","Tenha o Gmail em seu dispositivo m\u00f3vel","Equipe do Gmail ","Criado","<\/i><\/a>"],["","1","Dicas para usar o Gmail","Equipe do Gmail ","Criado","<\/i><\/a>"]]}[/code]
The headers are also with the correct mime type. Any ideias?
This discussion has been closed.
Replies
See also: http://next.datatables.net/manual/tech-notes/1
Allan