JSON::...bulary(3pm)

πŸ“¦
version 0.642 Β· 4 versions
, in ubuntu stonking

πŸ¦‹ JSON::Schema::Modern::Vocabulary πŸ’…

okay so you're reading the User Contributed Perl Documentation for JSON::Schema::Modern::Vocabulary (that's the (3pm) situation, iykyk) and honestly? bestie, you're in the right place. let's get into it. ✨


🌸 NAME

JSON::Schema::Modern::Vocabulary β€” the base role for all the JSON Schema vocabulary classes. it's giving blueprint, it's giving template, it's giving mother. πŸ‘‘


πŸŽ€ VERSION

this is version 0.642.

and bestie, important lore: the version numbering here is linearly increasing. that means you should not presume or infer anything from the version being less than 1.0. no cap. it's just numbers going up, that's the whole vibe.


✨ SYNOPSIS

package MyApp::Vocabulary::Awesome;
use Moo;
with 'JSON::Schema::Modern::Vocabulary';

πŸ’– DESCRIPTION

this package is the role that every single vocabulary class for JSON::Schema::Modern has to compose. it describes the basic structure that a vocabulary class is expected to have, and it defines some basic methods that are genuinely useful for traversing or evaluating various keywords. it's the group chat rules, fr fr. 🫢


🧚 ATTRIBUTES

so… there are no attributes listed here. the section exists. the attributes do not. that's it, that's the section, moving on πŸ’€


πŸ‘‘ METHODS

🌈 vocabulary

returns the canonical URI(s) describing the vocabulary for each draft specification version, exactly as described in the JSON Schema Core Meta-specification, section 8.1.2 β€” https://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.8.1.2

⚠️ must be implemented by the composing class. no skipping this one, bestie, it's literally required.

πŸ“ evaluation_order

returns a positive integer, and it's used as a sort key for determining the evaluation order of this vocabulary.

so if you don't override it in your custom vocabulary class, your evaluation order lands after all the built-in vocabularies. and honestly? you probably don't need to define this. like, at all. leave it alone. πŸ›‘

πŸ’œ keywords

returns the list of keywords defined by the vocabulary.

⚠️ must be implemented by the composing class. yes, this one too. periodt.

πŸ”₯ traverse

traverses a subschema. callers are expected to establish a new $state scope. keep that in mind, alright?

🌸 traverse_subschema

recursively traverses the schema at the current keyword β€” same energy as what happens with the "not" keyword.

πŸ¦‹ traverse_array_schemas

recursively traverses the list of subschemas at the current keyword β€” same energy as the "allOf" keyword.

⭐ traverse_object_schemas

recursively traverses the (subschema) values of the object at the current keyword β€” same energy as the $defs keyword.

πŸŽ€ traverse_property_schema

recursively traverses the subschema under one property of the object at the current keyword.

πŸ’– eval

evaluates a subschema. and again β€” callers are expected to establish a new $state scope. same rule as traverse, don't forget it 😭

πŸ‘‘ eval_subschema_at_uri

resolves a URI to a subschema, then evaluates that subschema. that's essentially the $ref keyword, if that helps it click. iykyk. πŸ’…


🫢 GIVING THANKS

if you found this module useful, please show your appreciation by:

it costs you nothing and it means the world, bestie 🌈


🧚 SUPPORT

bugs may be submitted here: https://github.com/karenetheridge/JSON-Schema-Modern/issues

also! I'm 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 the OpenAPI Slack server (https://open-api.slack.com) β€” both of those are great resources for finding help. like genuinely iconic places to get unstuck. ✨


πŸ’œ AUTHOR

Karen Etheridge <ether@cpan.org>


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.

one tiny note: some schema files have their own licence, in share/LICENSE. πŸ‘€

and that's the whole page, bestie!! πŸŽ‰ this was JSON::Schema::Modern::Vocabulary for perl v5.40.1, dated 2026-07-31 β€” go forth and compose your roles, you absolute main character πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from