Class JSONParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.codename1.io.JSONParseException
Thrown by
JSONParser.parseStrict(String) and its overloads for a document
that is not JSON, carrying where in the text reading stopped.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe character offset in the document at which the error was found.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JSONParseException
Creates the exception.
Parameters
-
message: what was wrong -
offset: the character offset at which it was found, or -1
-
-
-
Method Details
-
getOffset
public int getOffset()The character offset in the document at which the error was found.
Returns
the offset, or -1 when no single position applies
-