Conservative shape inference
Maps observed JSON values to schema types without guessing dates, emails, UUIDs or constraints that one sample cannot establish.
Day 033 / APIs / JSON Schema
A dependency-free Python CLI that turns one bounded local JSON object into a deterministic Draft 2020-12 starter schema for human review.
Maps observed JSON values to schema types without guessing dates, emails, UUIDs or constraints that one sample cannot establish.
Sorts properties, marks observed fields as required and closes objects by default, with an explicit option to allow additional properties.
Treats empty and mixed arrays cautiously and documents that the generated result is a starting point, not a proven production contract.
Draft 2020-12 starter output
Recursive object and array inference
Deterministic property ordering
Bounded local-only input
No speculative string formats
Twelve standard-library tests included
Argparse, pathlib, JSON, math and deterministic serialization provide the complete dependency-free workflow.
Produces a Draft 2020-12 declaration with recursively inferred object, array and scalar shapes.
Twelve tests cover scalar distinctions, nested objects, arrays, deterministic ordering, depth limits, invalid JSON and CLI output.