Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public class JSONParseException
- Object
- Throwable
- Exception
- IOException
- JSONParseException
Thrown by
JSONParser.parseStrict(String) and its overloads for a document
that is not JSON, carrying where in the text reading stopped.Constructors
public JSONParseException(String message, int offset) | Creates the exception. |
Methods
public int getOffset() | The character offset in the document at which the error was found. |
Inherited methods
Constructor details
JSONParseException
public JSONParseException(String message, int offset)Creates the exception.
Parameters
messageString- what was wrong
offsetint- 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