protocol
json_pointer_protocol
JSON Pointer (RFC 6901) parser, generator, and evaluator protocol.
logtalk_load(json_pointer(loader))staticPublic predicates
parse/2
Parses a JSON Pointer from the given source (codes(Codes), chars(Chars), or atom(Atom)) into a list of reference tokens. Fails if the pointer cannot be parsed.
staticparse(Source,Pointer)parse(++compound,--list(ground)) - zero_or_oneSource is a variable:instantiation_errorSource is neither a variable nor a valid source:domain_error(json_pointer_source,Source)generate/2
Generates a JSON Pointer using the representation specified in the first argument (codes(Codes), chars(Chars), or atom(Atom)) for the list of reference tokens in the second argument.
staticgenerate(Sink,Pointer)generate(+compound,++list(ground)) - one_or_errorSink is a variable:instantiation_errorPointer is neither a variable nor a list:type_error(list,Pointer)Pointer contains an invalid reference token:domain_error(json_pointer_token,Token)Sink cannot be generated:domain_error(json_pointer_sink,Sink)parse_fragment/2
Parses a URI fragment representation of a JSON Pointer from the given source (codes(Codes), chars(Chars), or atom(Atom)) into a list of reference tokens. Fails if the fragment cannot be parsed.
staticparse_fragment(Source,Pointer)parse_fragment(++compound,--list(ground)) - zero_or_oneSource is a variable:instantiation_errorSource is neither a variable nor a valid source:domain_error(json_pointer_fragment_source,Source)generate_fragment/2
Generates the URI fragment representation of a JSON Pointer using the representation specified in the first argument (codes(Codes), chars(Chars), or atom(Atom)) for the list of reference tokens in the second argument.
staticgenerate_fragment(Sink,Pointer)generate_fragment(+compound,++list(ground)) - one_or_errorSink is a variable:instantiation_errorPointer is neither a variable nor a list:type_error(list,Pointer)Pointer contains an invalid reference token:domain_error(json_pointer_token,Token)Sink cannot be generated:domain_error(json_pointer_fragment_sink,Sink)evaluate/3
Evaluates a parsed JSON Pointer against a JSON term. Fails if the pointer does not identify a value in the given JSON term.
staticevaluate(Pointer,JSON,Value)evaluate(++list(ground),++term,?term) - zero_or_onePointer is a variable:instantiation_errorJSON is a variable:instantiation_errorPointer is neither a variable nor a list:type_error(list,Pointer)Pointer contains an invalid reference token:domain_error(json_pointer_token,Token)Protected predicates
(none)
Private predicates
(none)
Operators
(none)