Attempt to decode a plain object into a value of type T. Throws a descriptive error if the object does not match the structure described by the decoder.
Any object.
A value of the type described by the Decoder.
Attempt to decode some JSON input into a value of type T. Throws a descriptive error if the JSON input does not match the structure described by the Decoder.
A JSON encoded string.
A value of the type described by the Decoder.
Generated using TypeDoc
A Decoder represents a way to decode JSON into type T. Provided in this module are Decoders for primitive JSON types, as well as a set of higher-order Decoders that can be composed together to decode complex nested objects.