DataTables warning: JSON data from server could not be parsed.

DataTables warning: JSON data from server could not be parsed.

rahulrahul Posts: 2Questions: 0Answers: 0
edited September 2011 in DataTables 1.8
Hi, i am trying to display very basic data on HTML page using c# and datatables 1.8.1 server-side processing. I am getting response from my aspx page which i validated using jsonlint as specified in forum articles. But datatables not getting displayed and getting error
[quote]
DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
[/quote]AS per JOSNlint jsonstring is valid I have checked other articles in forum regarding same issue, but datattables not getting displayed. what is wrong ? json or code
JSON Response
[quote]{"sEcho": 1,"iTotalRecords": 96,"iTotalDisplayRecords": 96,"aaData": [["Valentine Dinner's On Us!","12 Feb 2011","15 Feb 2011","Indian Bistro","Event Campaign"],["UmbhaCustAcq","08 Dec 2010","23 Dec 2010","Umbhaba Lodge","Customer Acquisition"],["GlenMkt989","02 Dec 2010","24 Dec 2010","Glenburn Lodge","Marketing Campaign"],["Ashish","20 Jan 2011","31 Jan 2011","Aster Pahadganj","Offer Campaign"],["AskaCamp505","09 Dec 2010","30 Dec 2010","Askari Lodge ","Offer Campaign"],["Current Offers Info:","01 Jan 2011","15 Feb 2011","Indian Bistro","Offer Campaign"],["Offer Campaign","05 Jan 2011","12 Jan 2011","SSP1","Offer Campaign"],["Opt In","14 Jan 2011","15 Jan 2011","Aster club","OptIn Campaign"],["1010PollGuvon","03 Dec 2010","29 Apr 2011","Guvon Hotels","Poll Campaign"],["FairManaged3439","","","The Fairway Hotel and Spa","Managed Campaign"]]}[/quote]

Html page
[code]


Server-Side Processing Data Table

@import "css/demo_page.css";
@import "css/demo_table.css";
@import "css/demo_table_jui.css";
@import "css/ui-lightness/jquery-ui-1.8.11.custom.css";







$(document).ready(function() {
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sAjaxSource": "FetchDataForm.aspx"
});
});




DataTables server-side processing example




Campaign Title Display StartDateDisplay EndDate
Entity Name
CampaignType Name


Loading data from server

[/code]

Replies

  • rahulrahul Posts: 2Questions: 0Answers: 0
    Figured out issue, it was aspx page which was causing JSON error
    Solved.
This discussion has been closed.