Default
Default
In-browser search
Settings
A consolidated list of the options each public entry point accepts. Unknown
options are rejected (they raise or return a PB.OptionError ) rather than being
silently ignored.
Option Values Default Notes :projectionslist of {fqn, opts} []Message-level adapters and structural representation. See below.
Each :projections entry pairs a fully-qualified message name with a keyword
list. adapter: is mutually exclusive with the structural keys:
Key Values Notes adapter:%PB.Adapter{}App/proto conversion spec. struct:ModuleProject the message to a struct. unwrap:field_name | trueProject to the single field's value. preserved_unknown_fields::drop | :reject | {:field, atom}Unknown-field policy (struct/unwrap). Default :drop. extensions::reject | {:field, atom}Extension policy (struct). Default :reject. oneofs:[{oneof_name, [representation: :identity]}]Identity-projected oneofs.
See Decoding into structs and
Adapters and well-known types .
Option Values Default Notes :unknown_fields:error | :ignore:errorHow unknown map keys are handled.
Option Values Default Notes :defaultsbooleanfalsePopulate missing scalar/enum/repeated/map fields with proto3 defaults. Singular messages and oneofs are never populated. :message_namesnil | :rootnilAnnotate the root decoded map with :__message_name__.
PB.JSON encode (encode/4, encode_iodata/4, to_term/4)Option Values Default :emit_defaultsbooleanfalse:use_proto_namesbooleanfalse:enums_as_intsbooleanfalse
PB.JSON decode (decode/4, from_term/4)Option Values Default :ignore_unknownbooleanfalse
Option Values Notes :contextkeyword | map | %PB.Validate.Context{}Runtime context for CEL evaluation. :now{:timestamp, unix_nanoseconds}Value bound to the now variable in CEL rules.