public class DateTimeAdapter
extends com.solidfire.gson.TypeAdapter<org.joda.time.DateTime>
Constructor and Description |
---|
DateTimeAdapter() |
Modifier and Type | Method and Description |
---|---|
org.joda.time.DateTime |
read(com.solidfire.gson.stream.JsonReader reader)
Reads a DateTime object.
|
static java.lang.Class<org.joda.time.DateTime> |
serializingClass()
Gets the Class that this adapter serializes.
|
void |
write(com.solidfire.gson.stream.JsonWriter writer,
org.joda.time.DateTime value)
Writes a DateTime object.
|
public static java.lang.Class<org.joda.time.DateTime> serializingClass()
public org.joda.time.DateTime read(com.solidfire.gson.stream.JsonReader reader) throws java.io.IOException
read
in class com.solidfire.gson.TypeAdapter<org.joda.time.DateTime>
reader
- the JSON reader to read from.java.io.IOException
- if the DateTime object cannot be parsedpublic void write(com.solidfire.gson.stream.JsonWriter writer, org.joda.time.DateTime value) throws java.io.IOException
write
in class com.solidfire.gson.TypeAdapter<org.joda.time.DateTime>
writer
- the JSON writer to write to.value
- the DateTime object to write.java.io.IOException