public class ValueTypeAdapter extends Object implements JsonTypeAdapter<Value>
| Constructor and Description |
|---|
ValueTypeAdapter(boolean typeSafety) |
| Modifier and Type | Method and Description |
|---|---|
Value |
fromJson(com.google.gson.JsonElement json,
com.google.gson.JsonDeserializationContext jsonDeserializationContext) |
Class |
getValueType()
target class of
ValueType, for ex. |
com.google.gson.JsonElement |
toJson(Value sourceValue,
com.google.gson.JsonSerializationContext jsonSerializationContext) |
public com.google.gson.JsonElement toJson(Value sourceValue, com.google.gson.JsonSerializationContext jsonSerializationContext)
toJson in interface JsonTypeAdapter<Value>sourceValue - not nulljsonSerializationContext - use it to invoke default serialization on the specified objectpublic Value fromJson(com.google.gson.JsonElement json, com.google.gson.JsonDeserializationContext jsonDeserializationContext)
fromJson in interface JsonTypeAdapter<Value>json - not null and not JsonNulljsonDeserializationContext - use it to invoke default deserialization on the specified objectpublic Class getValueType()
JsonTypeAdapterValueType, for ex. Money.classgetValueType in interface JsonTypeAdapter<Value>Copyright © 2014. All rights reserved.