JsonDataException

Thrown when the data in a JSON document doesn't match the data expected by the caller. For example, suppose the application expects a boolean but the JSON document contains a string. When the call to nextBoolean is made, a {@code JsonDataException} is thrown.

Exceptions of this type should be fixed by either changing the application code to accept the unexpected JSON, or by changing the JSON to conform to the application's expectations.

This exception may also be triggered if a document's nesting exceeds 31 levels. This depth is sufficient for all practical applications, but shallow enough to avoid uglier failures like StackOverflowError .

class JsonDataException : RuntimeException

Constructors

JsonDataException
Link copied to clipboard
open fun JsonDataException()
JsonDataException
Link copied to clipboard
open fun JsonDataException(message: String)
JsonDataException
Link copied to clipboard
open fun JsonDataException(cause: Throwable)
JsonDataException
Link copied to clipboard
open fun JsonDataException(message: String, cause: Throwable)

Functions

addSuppressed
Link copied to clipboard
fun addSuppressed(exception: Throwable)
fillInStackTrace
Link copied to clipboard
open fun fillInStackTrace(): Throwable
getCause
Link copied to clipboard
open fun getCause(): Throwable
getLocalizedMessage
Link copied to clipboard
open fun getLocalizedMessage(): String
getMessage
Link copied to clipboard
open fun getMessage(): String
getOurStackTrace
Link copied to clipboard
open fun getOurStackTrace(): Array<StackTraceElement>
getStackTrace
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
getSuppressed
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
initCause
Link copied to clipboard
open fun initCause(cause: Throwable): Throwable
printEnclosedStackTrace
Link copied to clipboard
open fun printEnclosedStackTrace(s: Throwable.PrintStreamOrWriter, enclosingTrace: Array<StackTraceElement>, caption: String, prefix: String, dejaVu: Set<Throwable>)
printStackTrace
Link copied to clipboard
open fun printStackTrace()
readObject
Link copied to clipboard
open fun readObject(s: ObjectInputStream)
setStackTrace
Link copied to clipboard
open fun setStackTrace(stackTrace: Array<StackTraceElement>)
toString
Link copied to clipboard
open fun toString(): String
validateSuppressedExceptionsList
Link copied to clipboard
open fun validateSuppressedExceptionsList(deserSuppressedExceptions: List<Throwable>): Int
writeObject
Link copied to clipboard
open fun writeObject(s: ObjectOutputStream)