JSONDecodeError¶
A structural mismatch when decoding parsed JSON into a domain type.
JSONDecodeError is distinct from JsonParseError:
JsonParseError means the response body was not valid JSON syntax, while
JSONDecodeError means the JSON was syntactically valid but its structure
doesn't match what the decoder expected — a missing field, a field with the
wrong type, or any other shape mismatch. The message should describe what was
expected versus what was found.
Implements¶
- Stringable box
Constructors¶
create¶
Create a decode error with a descriptive message.
Parameters¶
- message': String val
Returns¶
- JSONDecodeError val^
Public fields¶
let message: String val¶
Public Functions¶
string¶
Return the error message.
Returns¶
- String iso^