Class CloudStackParserModule.CloudStackDateAdapter

java.lang.Object
com.google.gson.TypeAdapter<Date>
org.jclouds.json.config.GsonModule.DateAdapter
org.jclouds.json.config.GsonModule.Iso8601DateAdapter
org.jclouds.cloudstack.config.CloudStackParserModule.CloudStackDateAdapter
Enclosing class:
CloudStackParserModule

public static class CloudStackParserModule.CloudStackDateAdapter extends org.jclouds.json.config.GsonModule.Iso8601DateAdapter
Data adapter for the date formats used by CloudStack. Essentially this is a workaround for the CloudStack getUsage() API call returning a corrupted form of ISO-8601 dates, which have an unexpected pair of apostrophes, like 2011-12-12'T'00:00:00+00:00
  • Method Summary

    Modifier and Type
    Method
    Description
    read(com.google.gson.stream.JsonReader reader)
     

    Methods inherited from class org.jclouds.json.config.GsonModule.Iso8601DateAdapter

    parseDate, write

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • read

      public Date read(com.google.gson.stream.JsonReader reader) throws IOException
      Overrides:
      read in class org.jclouds.json.config.GsonModule.Iso8601DateAdapter
      Throws:
      IOException