2 unstable releases
0.2.0 | May 23, 2022 |
---|---|
0.1.0 | Sep 26, 2020 |
#2554 in Command line utilities
61KB
1.5K
SLoC
JSON Schema hacking toolset
This is all-in-one toolset for JSON Schema.
Usecases
This tools allow you:
- Search schemas by pattern on schemastore.org
- Retrieve found schema from schemastore
- Infer schema from data-sample to help start hacking it (thanks to infers-jsonschema)
- [TODO] Optimize existing schema (thanks to jsonschema-equivalent)
- Validate existing data using schema from file or from schemastore using one of supported validator
Configuration
A rich set of features allows costomize this tool before build.
- Support multiple JSON Schema validators (
feature = "all-validators"
enables all)- valico (draft-6 only,
feature = "valico"
) - jsonschema (draft-4/6/7,
feature = "jsonschema"
) - jsonschema-valid (draft-4/6/7,
feature = "jsonschema-valid"
)
- valico (draft-6 only,
- Support many input data formats (
feature = "all-parsers"
enables all)- Text formats (
feature = "txt-parsers"
enables all)- json (default)
- json5 (
feature = "json5"
) - yaml (
feature = "yaml"
) - toml (
feature = "toml"
) - ron (
feature = "ron"
)
- Binary formats (
feature = "bin-parsers"
enable all)- bson (
feature = "bson"
) - cbor (
feature = "cbor"
) - pickle (
feature = "pickle"
)
- bson (
- Text formats (
- Integration with schemastore.org (
feature = "schemastore"
)- Adds
search
command which allows find schemas by patterns - Adds
retrieve
command which download schema from store
- Adds
- An
infer
command which can help infer JSON Schema from data (feature = "infers"
)
Validators comparison
Validator | Pros | Cons |
---|---|---|
valico | Meaningful error reports | Slow validation |
jsonschema | Fast validation | Obscure error reports |
Dependencies
~6–24MB
~396K SLoC