DT shows error if JSON array is NULL while doing AJAX
DT shows error if JSON array is NULL while doing AJAX
Hello,
I am using DT with server data as AJAX source,
When there are data in server, my AJAX gets data and shows in table,
But when there are no data in server, my datatable shows below error message on every AJAX request of 1 minutes,
DataTables warning: table id=tickets_table - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
I checked as per above link, but it just ask to check valid JSON,
How can i prevent this and shows no data when JSON is empty\null.