ORT-JSON(1) General Commands Manual ORT-JSON(1)

ort-jsongenerate JSON representation of configuration

ort-json [config...]

Accepts ort(5) config files, defaulting to standard input, and generates a JSON representation of the configuration to standard output. ort-json accepts no arguments.

Parse errors, if any, are printed to standard error.

The ort-json.ts file, usually distributed in /usr/local/share/openradtool, consists of a TypeScript namespace describing the output.

The ort-json utility exits 0 on success, and >0 if an error occurs.

The following shell snippet demonstrates validating JSON against the TypeScript definitions, which are assumed to be in /usr/local/share/openradtool. The ort(5) configuration is db.ort, and the jsonschema and jsonlint utilities are assumed to be installed. Translation from the TypeScript definitions to JSON schema are managed by the typescript-json-schema utility installed via npm(1).

% npm init -y
% npm install typescript-json-schema
% node_modules/.bin/typescript-json-schema \
> --strictNullChecks /usr/local/share/openradtool/ort-json.ts \
> ortJson.ortJsonConfig > ort-json.schema
% ort-json db.ort > db.json
% jsonlint db.json
% jsonschema -i db.json ort-json.schema

ort(5)

August 31, 2024 OpenBSD 7.5