|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Jsonator<T>
Interface to implement if you want to provide a method to create a JSON representation of an object
Nested Class Summary | |
---|---|
static class |
Jsonator.EnumConversionMode
Defines handling of Java enums during Object to JSON conversion. |
Method Summary | |
---|---|
com.google.gson.JsonElement |
convert(T object)
Creates a JsonElement representation of a given object. |
com.google.gson.JsonElement |
convert(T object,
Jsonator.EnumConversionMode enumConversionMode)
Creates a JsonElement representation of a given object |
Method Detail |
---|
com.google.gson.JsonElement convert(T object)
JsonElement
representation of a given object.
Enums are converted to their names.
object
- the object to be serialized
com.google.gson.JsonElement convert(T object, Jsonator.EnumConversionMode enumConversionMode)
JsonElement
representation of a given object
object
- the object to be serializedenumConversionMode
- defines enum handling
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |