org.jclouds.cloudstack.config
Class 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.CloudStackDateAdapter
public class CloudStackDateAdapter
- extends 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 formn of ISO-8601 dates, which have an unexpected pair of apostrophes, like
2011-12-12'T'00:00:00+00:00
- Author:
- Richard Downer
Method Summary |
Date |
read(com.google.gson.stream.JsonReader reader)
|
Methods inherited from class com.google.gson.TypeAdapter |
nullSafe |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
read
public Date read(com.google.gson.stream.JsonReader reader)
throws IOException
- Overrides:
read
in class GsonModule.Iso8601DateAdapter
- Throws:
IOException
Copyright © 2009-2012 jclouds. All Rights Reserved.