public class WatermarkSerializerHelper extends Object
Watermark to a JsonElement, and vice versa. The
class uses GSON to achieve this. This class provides a default
way to serialize and de-serialize Watermarks, and is useful for implementing the Watermark.toJson()
method.| Constructor and Description |
|---|
WatermarkSerializerHelper() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Watermark> |
convertJsonToWatermark(com.google.gson.JsonElement jsonElement,
Class<T> clazz)
Converts a
JsonElement into the specified class type using the Gson.fromJson(JsonElement, Class)
method. |
static com.google.gson.JsonElement |
convertWatermarkToJson(Watermark watermark)
|
public static com.google.gson.JsonElement convertWatermarkToJson(Watermark watermark)