JSON::...tation(3pm)
β¨ NAME β¨
JSON::Schema::Modern::Vocabulary::FormatAnnotation β okay so this is the implementation of the JSON Schema Format-Annotation vocabulary π
and yes bestie, it lives in section 3pm of the User Contributed Perl Documentation, so you already know it's giving real-deal module energy.
πΈ VERSION πΈ
version 0.642
Not me using a linearly-increasing version numbering scheme β no meaning should be presumed or inferred from the version being less than 1.0. Like, it's not a baby module just because it's a 0-dot-something, ok?? π
π¦ DESCRIPTION π¦
So this is the implementation of the JSON Schema Draft 2020-12 "Format-Annotation" vocabulary, which gets indicated in metaschemas with the URI https://json-schema.org/draft/2020-12/vocab/format-annotation and is formally specified over at https://json-schema.org/draft/2020-12/json-schema-validation.html#section-7. Periodt.
And it's not just one draft, she's versatile π β support is also provided for:
- the equivalent Draft 2019-09 keyword, indicated in metaschemas with the URI
https://json-schema.org/draft/2019-09/vocab/formatand formally specified in https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-02#section-7. - the equivalent Draft 7 keyword, as formally specified in https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-7.
- the equivalent Draft 6 keyword, as formally specified in https://json-schema.org/draft-06/draft-wright-json-schema-validation-01#rfc.section.8.
- the equivalent Draft 4 keyword, as formally specified in https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.7.
Iconic behaviour, truly. π
It also implements format assertion behaviour in a relaxed mode, meaning the validate_formats option in JSON::Schema::Modern has been enabled, and unknown formats will not generate errors. Which is lowkey the opposite vibe from the more strict behaviour in JSON::Schema::Modern::Vocabulary::FormatAssertion, which requires all formats used in the schema to be supported and defined. Strict queen vs. chill queen, you know how it is. π
Now listen closely because this part is the actual tea β β when this vocabulary (the Format-Annotation vocabulary) is specified (which, btw, is the default for the draft2020-12 metaschema) and combined with the validate_formats option set to true, then:
- unimplemented formats will silently validate π€«
- but implemented formats will validate completely π―
Heads up bestie: some formats require optional module dependencies, and the lack of these modules will generate an error. So don't come crying to me if you skipped the optional deps, I warned you fr fr π
And when the Format-Assertion vocabulary is specified, unimplemented formats will generate an error on use. No silent validating over there, she's calling you out directly. π
π SEE ALSO π
- "Format Validation" in
JSON::Schema::Modern JSON::Schema::Modern::Vocabulary::FormatAssertion
π«Ά GIVING THANKS π«Ά
If you found this module to be useful, please show your appreciation by adding a +1 in MetaCPAN https://metacpan.org/dist/JSON-Schema-Modern and a star in GitHub https://github.com/karenetheridge/JSON-Schema-Modern. It costs you literally nothing and it makes someone's whole day, bestie. It's giving mutual support. π
π§ SUPPORT π§
Bugs may be submitted through https://github.com/karenetheridge/JSON-Schema-Modern/issues. Found a bug? Tell her, don't suffer in silence π
I am also usually active on irc, as ether at irc.perl.org and irc.libera.chat. Come say hi!!
You can also find me on the JSON Schema Slack server https://json-schema.slack.com and OpenAPI Slack server https://open-api.slack.com, which are also great resources for finding help. Real ones know. β¨
π AUTHOR π
Karen Etheridge <ether@cpan.org>
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2020 by Karen Etheridge.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Some schema files have their own licence, in share/LICENSE. Check those, bestie, don't just assume π
And that's the whole page, no cap β brought to you by perl v5.40.1, dated 2026-07-31, from your favourite JSON::...tation(3pm) manual. Slay, stay validating, and hydrate π
πβ¨
π¦ where this page comes from
- ubuntu stonking: libjson-schema-modern-perl 0.642-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms