jsonschema.vibejson

vibe.data.json adapter for jsonschema (subpackage jsonschema:vibe).

This module is the only place vibe-d appears as a dependency. It provides: VibeJsonAdapter (validate vibe.data.json.Json instances), compileSchema for Json schema documents, validateJson convenience, and nodeToVibeJson / vibeJsonToNode conversions (including rendering generated schemas as Json).

Members

Functions

compileSchema
Validator compileSchema(Json doc, ValidatorSettings settings)

Compile a schema document given as vibe.data.json.Json.

nodeToVibeJson
Json nodeToVibeJson(JsonNode n)

Render the internal representation as a vibe.data.json.Json value.

registerJson
void registerJson(SchemaStore store, string uri, Json doc)

Register a Json schema document in a store.

validateJson
ValidationResult validateJson(Validator v, Json instance, OutputFormat format)

Validate a vibe.data.json.Json instance against a compiled validator. (Free function because Validator lives in the base package; equivalent to v.validateWith!VibeJsonAdapter(instance, format).)

vibeJsonToNode
JsonNode vibeJsonToNode(Json v)

Convert a vibe.data.json.Json document into the internal representation. BigInt values keep 64-bit fidelity (signed or unsigned) and fall back to floating point only beyond the 64-bit range.

Structs

VibeJsonAdapter
struct VibeJsonAdapter

Adapter for vibe.data.json.Json.