Skip to content

Schema2000 is a tool that parses exsiting JSON documents and tries to derive a JSON schema from these documents.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rewe-digital/schema2000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schema 2000

Rust crates.io schema2000 crates.io schema2000-cli docs.rs schema2000

Schema2000 is a tool that parses exsiting JSON documents and tries to derive a JSON schema from these documents.

Currently, Schema2000 is configuration-less command line tool that excepts line-separated JSON documents from stdin and emits the derived schema to stdout once the input is consumed.

How to install

Download the latest binaries for your operating system, and add them to your $PATH and make them executable.

macOS specific installation

macOS will not open the app as the developer can not be verified. As a work-around, open the folder containing schema2000_macOS in Finder, "ctrl-click" on schema2000_macOS and click on the menu item "open". You can then confirm to open the app. This will open a terminal app session, which you can simply close.

Usage

Consume a file with line separated JSON documents:

$ cat line_separated.json | schema2000

Consume via MQTT (using Eclipse Mosquitto):

$ mosquitto_sub -t homeassistant/event | schema2000

Consume from Kafka (using kcat):

$ kcat -b $KAFKA_BROKER_ADDRESS_LIST -t your_topic | schema2000

Verify schemas

You may use any JSON schema validator to validate the input documents with the derived schema. This example uses yajsv:

yajsv -s schema.json line_separated.json

About

Schema2000 is a tool that parses exsiting JSON documents and tries to derive a JSON schema from these documents.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published