public static class Utils.LongDateJsonDeserializer extends Utils.WrapperDateJsonDeserializer
JsonDeserializer
to parse a long value to Date.Utils.LongDateJsonDeserializer
(new Utils.DefaultDateJsonDeserializer
());delegate
Constructor and Description |
---|
LongDateJsonDeserializer(com.google.gson.JsonDeserializer<java.util.Date> delegate) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
public LongDateJsonDeserializer(com.google.gson.JsonDeserializer<java.util.Date> delegate)
delegate
- JsonDeserializer<Date>, an extra deserializer used to parse an object to Date.
it can be null if only 'long value' needs to be parsed.public java.util.Date deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<java.util.Date>
deserialize
in class Utils.WrapperDateJsonDeserializer
com.google.gson.JsonParseException
Copyright © SAS Institute. All Rights Reserved.