diff options
Diffstat (limited to 'test/data/json.php')
-rw-r--r-- | test/data/json.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/data/json.php b/test/data/json.php new file mode 100644 index 000000000..d6e0f2fc7 --- /dev/null +++ b/test/data/json.php @@ -0,0 +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} }'; +} +?> |