Skip to main content

Module decode

Module decode 

Source
Expand description

Decoding Values into typed protocol values, following valita’s rules: optional fields may be absent but not null (unless declared nullable), and unknown keys are ignored (passthrough mode).

Structs§

Builder
Builds a JSON object, leaving out None fields.
DecodeError
Why a value didn’t decode. The path points at the offending value, like valita’s error paths.
Reader
Reads the fields of an object.

Traits§

JsonCodable
A value with a JSON form following the zero-protocol schema.

Functions§

array
v.array(element).
array_value
bool
compound_key
A non-empty array of strings (CompoundKey, PrimaryKey).
number
object
primary_key_value
A string, number, or boolean (primaryKeyValueSchema).
record
v.record(element), keeping the object’s order.
string
strings
strings_json
Strings as a JSON array.
tagged
A tuple message [tag, body].

Type Aliases§

Result