Package net.minidev.json.parser
Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
net.minidev.json.parser.ParseException
- All Implemented Interfaces:
Serializable
ParseException explains why and where the error occurs in source JSON text.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
private int
private int
private static final long
private Object
-
Constructor Summary
ConstructorsConstructorDescriptionParseException
(int position, int errorType, Object unexpectedObject) ParseException
(int position, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ERROR_UNEXPECTED_CHAR
public static final int ERROR_UNEXPECTED_CHAR- See Also:
-
ERROR_UNEXPECTED_TOKEN
public static final int ERROR_UNEXPECTED_TOKEN- See Also:
-
ERROR_UNEXPECTED_EXCEPTION
public static final int ERROR_UNEXPECTED_EXCEPTION- See Also:
-
ERROR_UNEXPECTED_EOF
public static final int ERROR_UNEXPECTED_EOF- See Also:
-
ERROR_UNEXPECTED_UNICODE
public static final int ERROR_UNEXPECTED_UNICODE- See Also:
-
ERROR_UNEXPECTED_DUPLICATE_KEY
public static final int ERROR_UNEXPECTED_DUPLICATE_KEY- See Also:
-
ERROR_UNEXPECTED_LEADING_0
public static final int ERROR_UNEXPECTED_LEADING_0- See Also:
-
errorType
private int errorType -
unexpectedObject
-
position
private int position
-
-
Constructor Details
-
ParseException
-
ParseException
-
-
Method Details
-
getErrorType
public int getErrorType() -
getPosition
public int getPosition()- Returns:
- The character position (starting with 0) of the input where the error occurs.
-
getUnexpectedObject
- Returns:
- One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character ERROR_UNEXPECTED_TOKEN ERROR_UNEXPECTED_EXCEPTION java.lang.Exception
-
toMessage
-