Invalid JSON response

Invalid JSON response

mvandergmvanderg Posts: 2Questions: 2Answers: 0

Hi,

Just getting started with datatables but I encounter a error which I don't know how to solve.

From an servlet I give a response like:

{ "data": [["1","127","server1","aa","65"],["1","127","server2","bb","125"]]}

Which is valid Json, tested it with http://json.parser.online.fr/

I'm calling the servlet from a static html page (for testing only) that is based on samples.

The webpage contains in the header:
$(document).ready(function() {
$('#example').dataTable( {
"processing": true,
"serverSide": true,
"ajax": {
"url": "http://localhost:8080/MonWebApp/NumberOfNodesJSON?environment=EE&numberOfInstances=1",
"dataType": "jsonp"
}
} );
} );

and in the body:

MANAGED PLATFORMCODE NODE PACKAGENAME SERVICES
MANAGED PLATFORMCODE NODE PACKAGENAME SERVICES

Still getting the invalid json error.

Any help is much appreciated.

Yours,

martijn

This discussion has been closed.