Decoder for string values.
string
A decoder that validates and returns string values
JsonDecoder.string().decode('hi'); // Ok<string>({value: 'hi'})JsonDecoder.string().decode(5); // Err({ issues: [{ message: '"5" is not a valid string', path: [] }] }) Copy
JsonDecoder.string().decode('hi'); // Ok<string>({value: 'hi'})JsonDecoder.string().decode(5); // Err({ issues: [{ message: '"5" is not a valid string', path: [] }] })
Decoder for
stringvalues.