Class JSONParseException


public class JSONParseException extends IOException
Thrown by JSONParser.parseStrict(String) and its overloads for a document that is not JSON, carrying where in the text reading stopped.
  • Constructor Details

    • JSONParseException

      public JSONParseException(String message, int offset)

      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