|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JsonSerializationContext
Context for serialization that is passed to a custom serializer during invocation of its
JsonSerializer.serialize(Object, Type, JsonSerializationContext)
method.
Method Summary | |
---|---|
JsonElement |
serialize(Object src)
Invokes default serialization on the specified object. |
JsonElement |
serialize(Object src,
Type typeOfSrc)
Invokes default serialization on the specified object passing the specific type information. |
Method Detail |
---|
JsonElement serialize(Object src)
src
- the object that needs to be serialized.
JsonElement
s corresponding to the serialized form of src
.JsonElement serialize(Object src, Type typeOfSrc)
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.
JsonElement
s corresponding to the serialized form of src
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |