Package rife.json

Class JsonParseException

All Implemented Interfaces:
Serializable

public class JsonParseException extends RuntimeException
A JsonParseException is thrown when a JSON document couldn't be parsed.

The line and the column where the parsing went wrong are part of the message of the exception and can also be retrieved individually, so that you can point at the exact location of the problem.

Since:
1.10
See Also:
  • Constructor Details

    • JsonParseException

      public JsonParseException(String message, int line, int column)
      Creates a new parse exception.

      The line and column numbers that you provide are appended to the message so that the location of the problem is always part of the description of the exception.

      Parameters:
      message - the description of the parse problem
      line - the line number where the problem occurred
      column - the column number where the problem occurred
      Since:
      1.10
      See Also:
  • Method Details

    • getLine

      public int getLine()
      Retrieves the line number where the parse problem occurred.
      Returns:
      the line number, starting at 1
      Since:
      1.10
      See Also:
    • getColumn

      public int getColumn()
      Retrieves the column number where the parse problem occurred.
      Returns:
      the column number, starting at 1
      Since:
      1.10
      See Also: