Reputation: 21
In Jquery Datatables editor, is there any option by which data with request sent to the server can be wrapped into JSON? Everywhere, the data is being sent as URL Parameters. And there seems to be no option for JSON request.
Thanks.
Upvotes: 2
Views: 1876
Reputation: 51
try this function in ajax section, works for me.
var editor = new $.fn.dataTable.Editor( {
ajax: {
url: '...',
data: function ( d ) {
return JSON.stringify( d );
}
},
...
} );
Upvotes: 4