File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -156,9 +156,9 @@ private function format( $items, $ascii_pre_colorized = false ) {
156156
157157 if ( 'json ' === $ this ->args ['format ' ] ) {
158158 if ( defined ( 'JSON_PARTIAL_OUTPUT_ON_ERROR ' ) ) {
159- echo json_encode ( $ out , JSON_PARTIAL_OUTPUT_ON_ERROR );
159+ echo json_encode ( $ out , JSON_PRETTY_PRINT | JSON_PARTIAL_OUTPUT_ON_ERROR );
160160 } else {
161- echo json_encode ( $ out );
161+ echo json_encode ( $ out, JSON_PRETTY_PRINT );
162162 }
163163 } elseif ( 'yaml ' === $ this ->args ['format ' ] ) {
164164 echo Spyc::YAMLDump ( $ out , 2 , 0 );
@@ -200,7 +200,7 @@ private function show_single_field( $items, $field ) {
200200 }
201201
202202 if ( 'json ' == $ this ->args ['format ' ] ) {
203- echo json_encode ( $ values );
203+ echo json_encode ( $ values, JSON_PRETTY_PRINT );
204204 }
205205 }
206206
You can’t perform that action at this time.
0 commit comments