File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ protected function json( $req ) {
9595 }
9696
9797 if ( isset ( $ req ->query ['array ' ] ) ) {
98- echo '[{"name":"John","age":21},{"name":"Peter","age":25} ] ' ;
98+ echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ] ' ;
9999 } else {
100- echo '{"data":{"lang":"en","length":25}} ' ;
100+ echo '{ "data": {"lang": "en", "length": 25} } ' ;
101101 }
102102 }
103103
@@ -112,8 +112,8 @@ protected function jsonp( $req ) {
112112 $ callback = $ _POST ['callback ' ];
113113 }
114114 $ json = isset ( $ req ->query ['array ' ] ) ?
115- '[{ "name":"John","age":21},{ "name":"Peter","age":25} ] ' :
116- '{"data":{ "lang":"en","length":25} } ' ;
115+ '[ { "name": "John", "age": 21 }, { "name": "Peter", "age": 25 } ] ' :
116+ '{ "data": { "lang": "en", "length": 25 } } ' ;
117117 echo cleanCallback ( $ callback ) . '( ' . $ json . ') ' ;
118118 }
119119
You can’t perform that action at this time.
0 commit comments