I am using the wdcalendar with asp.net. After getting the records from the database I need to return a JSON string back to the page. I have the DataTable which contains the records from the DB but I am not sure how to convert it to this exact format:
{
"end" : "09/29/2013 23:59",
"error" : null,
"events" : [ [ 1,
"test",
"09/26/2013 08:11",
"09/26/2013 08:08",
0,
0,
0,
"1",
1,
"loca",
""
],
[ 2,
"test2",
"09/27/2013 08:11",
"09/27/2013 08:08",
0,
0,
0,
"1",
1,
"loca",
""
]
],
"issort" : true,
"start" : "09/23/2013 00:00"
}
I added a new line to show the different data which contains two rows from the database and then at the end there is additional info appended to the data which is the last line shown above.
I am hoping there is a better way then building the string manually.
Thanks.