protocol
json_schema_protocolï
JSON Schema parser and validator protocol.
Availability:
logtalk_load(json_schema(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-01-29
Compilation flags:
staticDependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)
Public predicatesï
parse/2ï
Parses a JSON schema from the given source (file(Path), stream(Stream), codes(List), chars(List), or atom(Atom)) into a schema term.
Compilation flags:
staticTemplate:
parse(Source,Schema)Mode and number of proofs:
parse(++compound,--term) - one_or_errorvalidate/2ï
Validates a JSON term against a parsed schema. Succeeds if the JSON term is valid according to the schema.
Compilation flags:
staticTemplate:
validate(Schema,JSON)Mode and number of proofs:
validate(+term,+term) - zero_or_onevalidate/3ï
Validates a JSON term against a parsed schema. Returns a list of validation errors (empty list if valid).
Compilation flags:
staticTemplate:
validate(Schema,JSON,Errors)Mode and number of proofs:
validate(+term,+term,--list) - oneProtected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)