{"name":"@deckyard/jsonschema","description":"Validate JSON values against JSON Schema (draft 2020-12)","versions":{"0.1.0":{"version":"0.1.0","kind":"git","url":"https://github.com/deckyard/deck-jsonschema.git","ref":"0.1.0","commit":"abbd24542c85085564890b9a84043acb9e416743","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.25.0"},"capabilities":[],"keywords":["jennifer","deck","json","json-schema","validation"],"description":"Validate JSON values against JSON Schema (draft 2020-12)","publishedAt":"1793220002","repoId":1436273173,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# @deckyard/jsonschema\n\n[![test](https://github.com/deckyard/deck-jsonschema/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-jsonschema/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://deckyard.github.io/deck-jsonschema/)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-jsonschema)](https://github.com/deckyard/deck-jsonschema/releases/latest)\n\nValidates a `json.Value` against a [JSON Schema](https://json-schema.org/)\ndraft 2020-12 schema in [Jennifer](https://jennifer-lang.dev/), and reports\nevery failure with a JSON Pointer to the value and to the keyword. Passes every\nrequired test in the official JSON-Schema-Test-Suite.\n\n**[Documentation](https://deckyard.github.io/deck-jsonschema/)**\n\n## Install\n\n```sh\njvc add @deckyard/jsonschema\n```\n\nThis vendors the deck to `vendor/deckyard/jsonschema/`. Without `jvc`, unpack\nthe `src/` subtree of a release archive (`deckyard-jsonschema-\u003cversion\u003e.tar.gz`)\nthere.\n\n## Usage\n\n```jennifer\nimport \"@deckyard/jsonschema/\" as jsonschema;\n\ndef s as jsonschema.Schema init jsonschema.compile(json.decode(fs.readString(\"order.schema.json\")));\ndef r as jsonschema.Result init jsonschema.validate($s, json.decode(fs.readString(\"order.json\")));\nif (not $r.valid) {\n    io.printf(\"%s\", jsonschema.describe($r));\n}\n```\n\n`examples/validate.j` validates a good and a bad order.\n\n## Scope\n\n- All of draft 2020-12: `$ref`, `$dynamicRef`, `$anchor`, `unevaluatedProperties`,\n  `unevaluatedItems`, vocabularies. Draft 7's `dependencies` is honoured too.\n- No network: references resolve within the schema, to documents registered in\n  a `Registry`, and to the embedded 2020-12 meta-schemas.\n- `format` is checked on request for the common formats; see the\n  [formats guide](https://deckyard.github.io/deck-jsonschema/formats.html).\n- Patterns are RE2, Jennifer's regex dialect, with ECMA-262's `\\s`, `.`, `\\cX`\n  and `\\uXXXX` translated; lookaround and backreferences are not available.\n\n## Requirements\n\nJennifer 0.25.0 or newer. Pure computation: no network, no capabilities. Not\ntested on `jennifer-tiny`.\n\n## Development\n\n```sh\ntools/check-all.sh                   # the full gate, as CI runs it\njennifer test src/jsonschema_test.j  # unit tests and the test suite\ntools/gen-meta.sh                    # refresh the embedded meta-schemas\n```\n\n`testdata/suite` is the vendored JSON-Schema-Test-Suite (MIT);\n`testdata/exclusions.txt` lists the cases the deck knowingly fails, and why.\n\n## Licence\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n\nThe embedded meta-schemas in `src/topics/meta.j` are the JSON Schema\nSpecification Authors' work under BSD-3-Clause or AFL-3.0; the notice is in\nthat file.\n"}