| com.google.gson.JsonSerializationContext |
Context for serialization that is passed to a custom serializer during invocation of its
serialize(Object, Type, JsonSerializationContext) method.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract JsonElement |
serialize(Object src, Type typeOfSrc)
Invokes default serialization on the specified object passing the specific type information.
| ||||||||||
| abstract JsonElement |
serialize(Object src)
Invokes default serialization on the specified object.
| ||||||||||
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
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. |
JsonElements corresponding to the serialized form of src.
Invokes default serialization on the specified object.
| src | the object that needs to be serialized. |
|---|
JsonElements corresponding to the serialized form of src.