Class DurationDeserializer

java.lang.Object
com.sap.cloud.sdk.s4hana.connectivity.DurationDeserializer
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Duration>

@Deprecated public class DurationDeserializer extends Object implements com.google.gson.JsonDeserializer<Duration>
Deprecated.
This module will be discontinued, along with its classes and methods.
Helper class used for parsing durations measured by the ERP.
  • Constructor Details

    • DurationDeserializer

      public DurationDeserializer()
      Deprecated.
  • Method Details

    • deserialize

      @Nullable public Duration deserialize(@Nonnull com.google.gson.JsonElement json, @Nonnull Type typeOfT, @Nonnull com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Deprecated.
      Parses and converts a string, provided in the JsonElement, from microseconds to Duration.
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<Duration>
      Returns:
      The deserialized Duration, or null if the provided string is an invalid number.
      Throws:
      com.google.gson.JsonParseException