Correct options for getting custom JSON with AJAX
Correct options for getting custom JSON with AJAX
As a lot of others, I have problems getting my Datatables to use my custom JSON. Though, I can't really seem to find anything about which parameters one have to use, or how to actually find out what Datatables is trying to do with my data.
So I have a pretty standard REST API returning data in a JSON format, which I then spit into Datatables. It looks like this: http://pastebin.com/fn7L1KTj
Though, Datatables just gives me Uncaught TypeError: Cannot read property 'length' of undefined
at for ( i=0 ; i<aData.length ; i++ ) {
in the function called _fnBuildAjax
.
Is there any standard options I should use to get this running, or do I have to do some custom formatting in the initialization of Datatables too?