public class DurationDeserializer extends Object implements com.google.gson.JsonDeserializer<org.joda.time.Duration>
Constructor and Description |
---|
DurationDeserializer() |
Modifier and Type | Method and Description |
---|---|
org.joda.time.Duration |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context)
Parses and converts a string, provided in the json element, from microseconds to
Duration . |
public org.joda.time.Duration deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
Duration
. Returns
null
of the provided string is an invalid number.deserialize
in interface com.google.gson.JsonDeserializer<org.joda.time.Duration>
com.google.gson.JsonParseException
Copyright © 2018 SAP SE. All rights reserved.