| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
Public 成员函数 | 所有成员列表
com.google.gson.JsonSerializationContext接口 参考

## Public 成员函数
JsonElement | serialize (Object src)
JsonElement | serialize (Object src, Type typeOfSrc)

## 详细描述

Context for serialization that is passed to a custom serializer during invocation of its JsonSerializer#serialize(Object, Type, JsonSerializationContext) method.

作者
  Inderjeet Singh
  Joel Leitch

## 成员函数说明

JsonElement com.google.gson.JsonSerializationContext.serialize | ( | Object | src | ) |

Invokes default serialization on the specified object.

参数

  src | the object that needs to be serialized.

返回
  a tree of JsonElements corresponding to the serialized form of
  src
  .

JsonElement com.google.gson.JsonSerializationContext.serialize | ( | Object | src,
|  | Type | typeOfSrc
| ) |  |

Invokes default serialization on the specified object passing the specific type information. It should never be invoked on the element received as a parameter of the JsonSerializer#serialize(Object, Type, JsonSerializationContext) method. Doing so will result in an infinite loop since Gson will in-turn call the custom serializer again.

参数

  src | the object that needs to be serialized.
  typeOfSrc | the actual genericized type of src object.

返回
  a tree of JsonElements corresponding to the serialized form of
  src
  .

该接口的文档由以下文件生成:

- src/com/google/gson/JsonSerializationContext.java