TECHNOLOGY

JSON Schema format: annotation, assertion and validator configuration

In this article
THE QUICK TAKE

A format label in a schema does not by itself prove that the selected validator rejects every malformed value of that format.

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.

Python jsonschema format FAQ.

Ajv format support.

Related explanations: Schema conformance; Schema conversion.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles