public interface GsonSupport
GsonSupport you are able to
convert any IBean instance from and to JSON. For this to work you need
another two prerequisites:
GsonSerializerDeserializerForIBeans needs to be registered in the
used Gson. See GsonSerializerDeserializerForIBeans for
details.Gson| Modifier and Type | Method and Description |
|---|---|
void |
readFromJsonObject(JsonObject jsonObject,
JsonDeserializationContext context)
Reads the field values from a
JsonObject and sets the fields of
this IBean to the retrieved values. |
void |
writeToJsonObject(JsonObject jsonObject,
JsonSerializationContext context)
Writes the field values of this IBean out into a JsonObject.
|
void readFromJsonObject(JsonObject jsonObject, JsonDeserializationContext context)
JsonObject and sets the fields of
this IBean to the retrieved values.
You normally do not use this method directly. It is mainly called from
GsonSerializerDeserializerForIBeans during JSON deserialization.
jsonObject - the JsonObject reading some JSON representation of
this IBeancontext - the Gson deserialization contextvoid writeToJsonObject(JsonObject jsonObject, JsonSerializationContext context)
You normally do not use this method directly. It is mainly called from
GsonSerializerDeserializerForIBeans during JSON serialization.
jsonObject - the target where to write the field value tocontext - the Gson serialization context