public final class


extends JsonParseException
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException

Class Overview

This exception is raised when Gson attempts to read (or write) a malformed JSON element.


Public Constructors
JsonSyntaxException(String msg)
JsonSyntaxException(String msg, Throwable cause)
JsonSyntaxException(Throwable cause)
Creates exception with the specified cause.
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public JsonSyntaxException (String msg)

public JsonSyntaxException (String msg, Throwable cause)

public JsonSyntaxException (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.