object
bson(StringRepresentation)
StringRepresentation- Text representation to be used when decoding BSON strings and keys. Possible values areatom(default),chars, andcodes.
BSON format exporter and importer.
Availability:
logtalk_load(bson(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-08-04
Compilation flags:
static, context_switching_callsRemarks:
(none)
Inherited public predicates:
(none)
Public predicates
parse/2
Parses a list of bytes in the BSON format returning the corresponding document term. Throws an error when parsing is not possible.
Compilation flags:
staticTemplate:
parse(Bytes,Document)Mode and number of proofs:
parse(@list(byte),-ground) - one_or_errorExceptions:
Bytes is not ground:instantiation_errorBytes is ground but not a valid BSON byte sequence:domain_error(bson_byte_sequence,Bytes)generate/2
Generates a list of bytes in the BSON format representing the given document term. Throws an error when generating is not possible.
Compilation flags:
staticTemplate:
generate(Document,Bytes)Mode and number of proofs:
generate(@ground,-list(byte)) - one_or_errorExceptions:
Document is a variable:instantiation_errorDocument has no corresponding BSON representation:domain_error(bson_term,Document)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)