Skip to content

JSONDecodeError

[Source]

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.

class val JSONDecodeError is
  Stringable box

Implements


Constructors

create

[Source]

Create a decode error with a descriptive message.

new val create(
  message': String val)
: JSONDecodeError val^

Parameters

Returns


Public fields

let message: String val

[Source]


Public Functions

string

[Source]

Return the error message.

fun box string()
: String iso^

Returns