jlens-schema
Structural metadata for JSON documents, and a language service for JSONata expressions. Part of jlens.
- Infer a schema from sample documents. It records types, required and optional fields, number ranges, string formats, small enumerations and examples.
- Describe fields with descriptions, labels, allowed values and hidden flags, and convert to and from JSON Schema 2020-12.
- Assist people writing expressions: completion of fields, variables and functions; diagnostics for fields that do not exist (with "did you mean"); hover; signature help.
use ;
use json;
let schema = infer;
let service = new;
let text = "items[type = 'x'].";
let labels: = service
.complete
.items
.into_iter
.map
.collect;
assert_eq!;
let warnings = service.diagnostics;
assert!;
See the API reference and the schema guide of the jlens book.
License
MIT.