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 ) {
95
95
}
96
96
97
97
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 } ] ' ;
99
99
} else {
100
- echo '{"data":{"lang":"en","length":25}} ' ;
100
+ echo '{ "data": {"lang": "en", "length": 25} } ' ;
101
101
}
102
102
}
103
103
@@ -112,8 +112,8 @@ protected function jsonp( $req ) {
112
112
$ callback = $ _POST ['callback ' ];
113
113
}
114
114
$ 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 } } ' ;
117
117
echo cleanCallback ( $ callback ) . '( ' . $ json . ') ' ;
118
118
}
119
119
You can’t perform that action at this time.
0 commit comments