Scroll to navigation

GENSON(1) User Commands GENSON(1)

NAME

genson - user-friendly JSON Schema generator

DESCRIPTION

usage: genson [-h] [--version] [-d DELIM] [-e ENCODING] [-i SPACES]

[-s SCHEMA] [-$ SCHEMA_URI] ...

Generate one, unified JSON Schema from one or more JSON objects and/or JSON Schemas. Compatible with JSON-Schema Draft 4 and above.

positional arguments:

Files containing JSON objects (defaults to stdin if no arguments are passed).

options:

Show this help message and exit.
Show version number and exit.
Set a delimiter. Use this option if the input files contain multiple JSON objects/schemas. You can pass any string. A few cases ('newline', 'tab', 'space') will get converted to a whitespace character. If this option is omitted, the parser will try to auto-detect boundaries.
Use ENCODING instead of the default system encoding when reading files. ENCODING must be a valid codec name or alias.
Pretty-print the output, indenting SPACES spaces.
File containing a JSON Schema (can be specified multiple times to merge schemas).
-$, --schema-uri SCHEMA_URI
The value of the '$schema' keyword (defaults to 'http://json-schema.org/schema#' or can be specified in a schema with the -s option). If 'NULL' is passed, the "$schema" keyword will not be included in the result.
January 2025 genson 1.3.0-2