This Python script generates a JSON Schema from an example JSON document provided in a file and prints the schema to the console.
-
Clone the Repository or Download the Script:
Clone the repository or download the
generate_schema.py
script and therequirements.txt
file. -
Install Dependencies:
python -m venv .venv . ./.venv/bin/activate pip install -r requirements.txt
-
Prepare Your JSON Document:
Create an example JSON document and save it as
input.json
in the same directory as the script. -
Run the Script:
python generate_schema.py
This will read the JSON document from
input.json
, generate the corresponding JSON schema, and print it to the console.
This project is licensed under the MIT License - see the LICENSE file for details.