﻿# JSON Schema format: annotation, assertion and validator configuration

Check whether date, URI and other format constraints are enforced, identify validator plugins and vocabularies, and separate syntax checks from resource existence.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-json-schema-format-assertion-support/
Language: en

## Format can describe without rejecting

JSON Schema distinguishes format annotation from format assertion. A schema can label a string as a date or URI while the selected evaluation configuration treats that label as descriptive metadata rather than an enforced rejection rule.

For an agent tool, this affects whether a generated argument is merely a string or has passed a meaningful syntax check. The consumer should identify the actual validation mode before telling the application that a formatted value has already been verified.

## The declared vocabulary matters

The validation specification defines different requirements for the annotation and assertion vocabularies. Merely enabling some implementation-specific format checks is not the same as declaring full assertion-vocabulary support.

A proposed API contract records the dialect, the selected vocabulary and the formats on which application decisions rely. It avoids turning one successful date example into a claim of complete support for every standard or custom format. Missing support should remain visible rather than being disguised by a generic valid result.

## Libraries require their documented setup

The Python jsonschema FAQ explains why format checking is not enabled automatically by default and points to explicit format-checking support. Ajv documents formats supplied through plugins rather than assuming that the core package includes them all.

These are separate implementations with their own configuration. Copying a schema from one service to another does not copy enabled checkers, dependencies or supported format names. Record the relevant environment when a compatibility result depends on a format-specific rejection.

## Syntactic validity is not remote availability

The specification limits format checking to the defined syntactic semantics; it does not require a validator to contact a URL or verify the existence of a referenced entity. A syntactically acceptable artifact URL can still be expired, unauthorized or unavailable.

Keep parsing, allowed-destination policy and any authorized retrieval as separate application steps. A schema check should not be advertised as proof that a model artifact can be downloaded or that an email address belongs to the intended person.

## Boundary examples make enforcement inspectable

A proposed review includes valid examples, clearly malformed values, unsupported custom names and values that are well-formed but inaccessible. The expected result is specific to the declared configuration, not a universal promise attached to the word format.

The goal is to make argument validation explainable: a consumer should know which constraints were asserted, which were annotations and which checks remain the application's responsibility before using the value in an infrastructure or agent operation.

## Primary references

[JSON Schema format vocabularies](https://json-schema.org/draft/2020-12/json-schema-validation).

[Python jsonschema format FAQ](https://python-jsonschema.readthedocs.io/en/stable/faq/).

[Ajv format support](https://ajv.js.org/guide/formats.html).

Related explanations: [Schema conformance](/journal/provider-structured-output-conformance-tests/); [Schema conversion](/journal/llama-cpp-json-schema-gbnf-validation/).
