Class JsonException

    • Constructor Summary

      Constructors 
      Constructor Description
      JsonException​(java.lang.String message, java.lang.String line, int lineNo, int linePos, int len)  
      JsonException​(java.lang.String message, JsonTokenizer tokenizer, JsonToken token)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String asString()
      Deprecated.
      java.lang.String displayString()  
      int getLen()  
      java.lang.String getLine()  
      int getLineNo()  
      int getLinePos()
      Get the line position, 1-indexed of the first character that is part of the exception.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JsonException

        public JsonException​(java.lang.String message,
                             java.lang.String line,
                             int lineNo,
                             int linePos,
                             int len)
      • JsonException

        public JsonException​(java.lang.String message,
                             JsonTokenizer tokenizer,
                             JsonToken token)
                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getLine

        public java.lang.String getLine()
        Returns:
        The full utf-8 line (no ending line break) of the exception.
      • getLineNo

        public int getLineNo()
        Returns:
        The 1-indexed line number of the exception. If not representing a token, will be 0.
      • getLinePos

        public int getLinePos()
        Get the line position, 1-indexed of the first character that is part of the exception. If not representing a token, will be 0.
        Returns:
        Line position.
      • getLen

        public int getLen()
        Returns:
        The number of chars representing the token causing the exception. Will be at least 1 for anything representing a token. If not representing a token, will be 0.
      • asString

        @Deprecated
        public java.lang.String asString()
        Deprecated.
        Description copied from interface: Stringable
        Make a string representation of the instance value.
        Specified by:
        asString in interface Stringable
        Returns:
        The string representation.
      • displayString

        @Nonnull
        public java.lang.String displayString()
        Specified by:
        displayString in interface Displayable
        Returns:
        A displayable string value for the object. This is meant to be printed e.g. to console output and interpreted by a human.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable