public class JSONParseException extends RuntimeException
Exception that is thrown when invalid JSON is encountered by the parser.
The error message is formatted so that it points to the first.
This exception creates a message that points to the first offending character in the JSON string:
{ "x" : 3, "y" : 4, some invalid json.... } ^
Constructor and Description |
---|
JSONParseException(String jsonString,
int position)
Creates a new instance.
|
JSONParseException(String jsonString,
int position,
Throwable cause)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public JSONParseException(String jsonString, int position)
jsonString
- the JSON being parsedposition
- the position of the failurepublic String getMessage()
getMessage
in class Throwable