JsonEncodingException

Thrown when Json fails to encode a value to a JSON string.

Typical cases include encountering values that cannot be represented in JSON (e.g., non-finite floating-point numbers when they are not allowed) or using unsupported types as map keys.

The exception message includes shortMessage and, when present, a hint with actionable guidance for the developer.

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard

serial name of the affected class, if known.

Link copied to clipboard
open override val hint: String?

optional suggestions for the developer that can help fix or diagnose the problem.

Link copied to clipboard
open override val message: String
Link copied to clipboard
open override val shortMessage: String

short, human-readable description of the encoding error.