You can directly load JSON data by setting the 'listAction' to a JSON document .
Example:
actions: {
listAction: 'url/file.json',
},
Your JSON file needs to have the same fields specified and the next structure:
{
"Result":"OK",
"Records":[
{"PersonId":1,"Name":"Benjamin Button","Age":17,"RecordDate":"\/Date(1320259705710)\/"},
{"PersonId":2,"Name":"Douglas Adams","Age":42,"RecordDate":"\/Date(1320259705710)\/"},
{"PersonId":3,"Name":"Isaac Asimov","Age":26,"RecordDate":"\/Date(1320259705710)\/"},
{"PersonId":4,"Name":"Thomas More","Age":65,"RecordDate":"\/Date(1320259705710)\/"}
]
}
The common way is to point the 'listAction' to a server side script (PHP,ASP.NET...) that return the above JSON object.
Check the listAction
API reference for more information:
ApiReference-listAction