diff --git a/bin/validate-json b/bin/validate-json index 2f2fe448..e93d53a0 100755 --- a/bin/validate-json +++ b/bin/validate-json @@ -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(); }