JsonParseException

class JsonParseException(message: String, val offset: Int, val line: Int, val column: Int) : VariantException

JSON input is malformed.

The position is always reported, because "invalid JSON" without a position is useless against a multi-megabyte ingest payload.

Constructors

Link copied to clipboard
constructor(message: String, offset: Int, line: Int, column: Int)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val column: Int

one-based column, counted in bytes rather than code points. Bytes are what the parser has; for the ASCII structure of JSON the two agree, and inside a multi-byte string an exact byte position is more useful for debugging than an approximate character one.

Link copied to clipboard
val line: Int

one-based line number.

Link copied to clipboard
open val message: String?
Link copied to clipboard
val offset: Int

zero-based byte offset into the UTF-8 input.