JSON Schema for Linked Data, hereafter JSON-Schema-LD/json-schema-ld/jsc-ld, is a syntactic sugar for JSON Schema to enable generative interoperability by means of representing JSON schema in RDF vocabularies (RDF Schema) and RDF shapes (SHACL).
A JSON Schema is a declarative vocabulary specifies a number of rules to describe what objects serialized in JSON based format should look like. With JSC-LD, domain models and application profiles are extracted from existing implementation model in JSON Schema and represented in RDF Schema and Shacl shapes.
Built With
Synopsis
$ json-schema-ld --source json_schema.js --out out --prefix example --url "http://example.com/"
$ json-schema-ld -s PATH/TO/FOLDER/ -p example -u "http://example.com"
Options
-s, --source path/to/source/file|directory Path to a JSON schema file or a directory contains JSON schema files
-p, --prefix prefix JSC-LD predefined namespace prefix
-f, --format format RDF serialization format: Turtle, application/trig, N-Triples, or N-Quads. It
defaults to Turtle.
-u, --uri uri JSC-LD predefined namespace URI
-o, --out path/to/directory Path to output directory defaults to "out"
-h, --help
JSON-Schema-LD is developed upon the latest draft 2020-12
to describe data formats. Some custom keywords defined in a prior draft may not be supported.
Keywords that are supported by JSC-LD can be found Supported JSON Schema keywords.
Do not hesitate to report a bug.
This code is copyrighted by IDLab, Ghent University – imec and released under the MIT license.
Jiao Long, Brecht Van de Vyvere and Pieter Colpaert
IDLab, Ghent University – imec