mirror of
https://github.com/justinrainbow/json-schema.git
synced 2025-01-17 05:08:16 +01:00
JSON_PRETTY_PRINT compatibility for PHP < 5.4.0 ("--dump-schema")
This commit is contained in:
parent
34e298213d
commit
1fc065c8d7
@ -218,7 +218,8 @@ $refResolver = new JsonSchema\RefResolver($retriever);
|
||||
$refResolver->resolve($schema, $urlSchema);
|
||||
|
||||
if (isset($arOptions['--dump-schema'])) {
|
||||
echo json_encode($schema, JSON_PRETTY_PRINT) . "\n";
|
||||
$options = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0;
|
||||
echo json_encode($schema, $options) . "\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user