@HandleBeanView public class IntervalConverter extends Object implements Converter<org.joda.time.Interval>
| Modifier and Type | Class and Description |
|---|---|
static class |
IntervalConverter.ConverterFactory |
| Constructor and Description |
|---|
IntervalConverter(Converter<org.joda.time.DateTime> dateTimeConverter) |
| Modifier and Type | Method and Description |
|---|---|
org.joda.time.Interval |
deserialize(ObjectReader reader,
Context ctx) |
void |
serialize(org.joda.time.Interval interval,
ObjectWriter writer,
Context ctx) |
public IntervalConverter(Converter<org.joda.time.DateTime> dateTimeConverter)
public void serialize(org.joda.time.Interval interval,
ObjectWriter writer,
Context ctx)
throws Exception
serialize in interface Converter<org.joda.time.Interval>serialize in interface Serializer<org.joda.time.Interval>interval - we want to serialize. The object is of type T or a subclass (if this serializer
has been registered for subclasses).writer - to use to write data to the output stream.ctx - the current context.JsonBindingExceptionJsonStreamExceptionExceptionpublic org.joda.time.Interval deserialize(ObjectReader reader, Context ctx) throws Exception
deserialize in interface Converter<org.joda.time.Interval>deserialize in interface Deserializer<org.joda.time.Interval>reader - used to read data from.ctx - the current context.JsonBindingExceptionJsonStreamExceptionExceptionCopyright © 2019. All rights reserved.