|Did you know ...||Search Documentation:|
:- use_module(library(protobufs)).(can be autoloaded)
MessageType), creating a Prolog term.
Protoc must have been run (with the
option and the resulting top-level _
pb.pl file loaded. For
more details, see the "protoc" section of the overview documentation.
Fails if the message can't be parsed or if the appropriate meta-data
protoc hasn't been loaded.
All fields that are omitted from the
WireCodes are set
to their default values (typically the empty string or 0, depending on
the type; or
 for repeated groups). There is no way of
testing whether a value was specified in
WireCodes or given
its default value (that is, there is no equivalent of the Python
implementation's =HasField`). Optional embedded messages and groups do
not have any default value -- you must check their existence by using get_dict/3
or similar. If a field is part of a "oneof" set, then none of the other
fields is set. You can determine which field had a value by using get_dict/3.
|WireCodes||Wire format of the message from
e.g., read_stream_to_codes/2. (The stream
should have options |
|MessageType||Fully qualified message name
(from the |
|Term||The generated term, as nested dicts.|
version_error(Module-Version)you need to recompile the
Modulewith a newer version of
library(protobufs): Google's Protocol Buffers (section 1.3.1)
mapfields don't get special treatment (but see protobuf_map_pairs/3).
value_string_as(similar to json_read_dict/3)