public interface JsonSerializationContext
JsonSerializer.serialize(Object, Type, JsonSerializationContext)
method.Modifier and Type | Method and Description |
---|---|
JsonElement |
serialize(java.lang.Object src)
Invokes default serialization on the specified object.
|
JsonElement |
serialize(java.lang.Object src,
java.lang.reflect.Type typeOfSrc)
Invokes default serialization on the specified object passing the specific type information.
|
JsonElement serialize(java.lang.Object src)
src
- the object that needs to be serialized.JsonElement
s corresponding to the serialized form of src
.JsonElement serialize(java.lang.Object src, java.lang.reflect.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
."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"