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 .
| 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 .
该接口的文档由以下文件生成: