Dear Alan,
Right now, am using JSON object array, which returns data in the following format.
$('#JsonDialString').dataTable({
"sAjaxSource": '/Dials/GetDialJSON/',
"sPaginationType": "full_numbers",
"bDeferRender": true,
"bDestroy": true,
"bRetrieve": true,
"aaSorting": [[1, "asc"]],
"aoColumns": [
{"mData": "MaxLength","sTitle": "Max Length","sWidth": "10%" },....
]
.......
This returns around 40k records in the following format, which takes around 15 - 20 sec to load in data table. While investigating, we found the JSON file size is large around 7MB to 10MB.
{ "aaData": [{ id: 12, score: 34, interval: 5678, sub: 9012}, { id: 98, score: 76, interval: 5432, sub: 1098}, ...]}
This is because headings (id,score,interval, sub) repeat that much making the size huge like 7MB - 10MB.
Is there any option to keep the format in such a way that headings (id, score,interval,sub) repeat once only. Something like below.
[["id","score","interval","sub"],12,34,5678,9012,98,76,5432,1098,...]
or
{
“id”: [“12”, “98”],
“score”: [“34”, “76”],
“interval”: [“5678”, “5432”],
“sub”: [“9012”, “1098”],
}
or
any other option in datatable to compress json.
Thanks,
Prathap.