Decoder for null values.
null
A decoder that only accepts null values
const nullDecoder = JsonDecoder.null();nullDecoder.decode(null); // Ok<null>({value: null})nullDecoder.decode(123); // Err({ issues: [{ message: '123 is not null', path: [] }] })nullDecoder.decode(undefined); // Err({ issues: [{ message: 'undefined is not null', path: [] }] }) Copy
const nullDecoder = JsonDecoder.null();nullDecoder.decode(null); // Ok<null>({value: null})nullDecoder.decode(123); // Err({ issues: [{ message: '123 is not null', path: [] }] })nullDecoder.decode(undefined); // Err({ issues: [{ message: 'undefined is not null', path: [] }] })
Decoder for
nullvalues.