9.4 Decoding and validation
- A missing required field →
DecodeError.Missing. - A value that fails the invariant of a refined type or an
invariant→DecodeError.Invalid. - Unknown fields are skipped; with
@preserve_unknownon the type they are preserved and written back on re-serialisation.@preserve_unknownis allowed only ondata(otherwise the compile errorschema-attr) and acts only in the OxL binary format: the preserved raw records (tag and value) are written after the known fields in the order they were read; JSON, MessagePack and CBOR neither read nor write unknown fields. Nested messages keep their own unknown fields if they have the attribute. Preserved fields do not take part in==, the hash andShow(D-8053; DIV-005; D-7610). - An unknown variant of an
@openenum is mapped to the automatic variantUnknown(tag: u32). - In an rpc, a request decoding error is returned to the client as
ProtocolError.InvalidArgument; the handler is not called.
See also
Source: docs/spec/oxl-standard.en.md