Json header for prototype (PHP)

header(‘X-JSON: (‘ . json_encode($data) . ‘)’);

header(‘Content-type: application/x-json’);

echo json_encode($data);

Advertisements