- COPYRIGHT AND LICENCE
JSON::Schema::Draft201909::Annotation - Contains a single annotation from a JSON Schema evaluation
use JSON::Schema::Draft201909; my $js = JSON::Schema::Draft201909->new; my $result = $js->evaluate($data, $schema); my @annotations = $result->annotations; my $value = $annotations->annotation; my $instance_location = $annotations->instance_location; my $annotations_encoded = encode_json(\@annotations);
An instance of this class holds one annotation from evaluating a JSON Schema with JSON::Schema::Draft201909.
The keyword that produced the annotation.
The path in the instance where the annotation was produced; encoded as per the JSON Pointer specification (RFC 6901).
The schema path taken during evaluation to arrive at the annotation; encoded as per the JSON Pointer specification (RFC 6901).
The canonical URI or URI reference of the location in the schema where the error occurred; not defined, if there is no base URI for the schema and no
$ref was followed. Note that this is not actually fragmentless URI in most cases, as the indicated error will occur at a path below the position where the most recent identifier had been declared in the schema. Further, if the schema never declared an absolute base URI (containing a scheme), this URI won't be absolute either.
The actual annotation value (which may or may not be a string).
Returns a data structure suitable for serialization. Corresponds to one output unit as specified in https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.10.4.2 and https://json-schema.org/draft/2019-09/output/schema.
Bugs may be submitted through https://github.com/karenetheridge/JSON-Schema-Draft201909/issues.
I am also usually active on irc, as 'ether' at
Karen Etheridge <firstname.lastname@example.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.