genson
package is not owned or supported by Unstructured. For questions and
requests, see the Issues tab of the
genson
repository in GitHub.Install jq
genson
generates the JSON schema as a single string without any line breaks or indented whitespace.To pretty-print the schema that genson
produces, install the jq utility.jq
utility is not owned or supported by Unstructured. For questions and
requests, see the Issues tab of the
jq
repository in GitHub.Generate the schema
genson
command, specifying the path to the input (source) JSON file, and the path to
the output (target) JSON schema file to be generated. Use jq
to pretty-print the schema’s content
into the file to be generated.
Install dependencies
Add and run the schema generation code
LOCAL_FILE_INPUT_PATH
to the local path to the input (source) JSON file.LOCAL_FILE_OUTPUT_PATH
to the local path to the output (target) JSON schema file to be generated.LOCAL_FILE_OUTPUT_PATH
for the generated JSON schema file.