Adds jQuery collection to objects that will be used as global events context if provi...
[jquery.git] / test / data / json.php
index d19a417..d6e0f2f 100644 (file)
@@ -1,9 +1,13 @@
 <?php
 error_reporting(0);
+if ( $_REQUEST['header'] ) {
+       header("Content-type: application/json");
+}
+
 $json = $_REQUEST['json'];
 if($json) {
        echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ]';
 } else {
        echo '{ "data": {"lang": "en", "length": 25} }';
 }
-?>
\ No newline at end of file
+?>