AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | 静态包属性 | 所有成员列表
com.google.gson.JsonParseException类 参考
类 com.google.gson.JsonParseException 继承关系图:
com.google.gson.JsonIOException com.google.gson.JsonSyntaxException

Public 成员函数

 JsonParseException (String msg)
 
 JsonParseException (String msg, Throwable cause)
 
 JsonParseException (Throwable cause)
 

静态包属性

static final long serialVersionUID = -4086729973971783390L
 

详细描述

This exception is raised if there is a serious issue that occurs during parsing of a Json string. One of the main usages for this class is for the Gson infrastructure. If the incoming Json is bad/malicious, an instance of this exception is raised.

This exception is a RuntimeException because it is exposed to the client. Using a RuntimeException avoids bad coding practices on the client side where they catch the exception and do nothing. It is often the case that you want to blow up if there is a parsing error (i.e. often clients do not know how to recover from a JsonParseException.

作者
Inderjeet Singh
Joel Leitch

构造及析构函数说明

com.google.gson.JsonParseException.JsonParseException ( String  msg)
inline

Creates exception with the specified message. If you are wrapping another exception, consider using JsonParseException(String, Throwable) instead.

参数
msgerror message describing a possible cause of this exception.
com.google.gson.JsonParseException.JsonParseException ( String  msg,
Throwable  cause 
)
inline

Creates exception with the specified message and cause.

参数
msgerror message describing what happened.
causeroot exception that caused this exception to be thrown.
com.google.gson.JsonParseException.JsonParseException ( Throwable  cause)
inline

Creates exception with the specified cause. Consider using JsonParseException(String, Throwable) instead if you can describe what happened.

参数
causeroot exception that caused this exception to be thrown.

类成员变量说明

final long com.google.gson.JsonParseException.serialVersionUID = -4086729973971783390L
staticpackage

该类的文档由以下文件生成: