Class JsonSyntaxException

  • All Implemented Interfaces:

    public final class JsonSyntaxException
    extends JsonParseException
    This exception is raised when Gson attempts to read (or write) a malformed JSON element.
    See Also:
    Serialized Form
    • Method Summary

      • Methods inherited from class java.lang.Throwable

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

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

      • JsonSyntaxException

        public JsonSyntaxException​(java.lang.String msg)
      • JsonSyntaxException

        public JsonSyntaxException​(java.lang.String msg,
                                   java.lang.Throwable cause)
      • JsonSyntaxException

        public JsonSyntaxException​(java.lang.Throwable cause)
        Creates exception with the specified cause. Consider using JsonSyntaxException(String, Throwable) instead if you can describe what actually happened.
        cause - root exception that caused this exception to be thrown.