A very simple server-side script example:
<?php
$data = array(); // this is the array that will be json encoded and
returned to client
$data['page'] = 1; // number of current page
$data['total'] = 5; // total number of rows
$data['rows'] = array(); // array containing the rows to show in grid.
structure of this array follows
$row = array('id' => 1, 'cell' => array("column 1", "column 2",
"column 3", "column n"));
array_push($data['rows'], $row);
echo json_encode($data); // encode data array as json and return it to
the client
?>