@HandleClassMetadata @HandleBeanView public class DurationConverter extends Object implements Converter<org.joda.time.Duration>
Constructor and Description |
---|
DurationConverter() |
Modifier and Type | Method and Description |
---|---|
org.joda.time.Duration |
deserialize(ObjectReader reader,
Context ctx) |
void |
serialize(org.joda.time.Duration object,
ObjectWriter writer,
Context ctx) |
public void serialize(org.joda.time.Duration object, ObjectWriter writer, Context ctx) throws Exception
serialize
in interface Converter<org.joda.time.Duration>
serialize
in interface Serializer<org.joda.time.Duration>
object
- 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.JsonBindingException
JsonStreamException
Exception
public org.joda.time.Duration deserialize(ObjectReader reader, Context ctx) throws Exception
deserialize
in interface Converter<org.joda.time.Duration>
deserialize
in interface Deserializer<org.joda.time.Duration>
reader
- used to read data from.ctx
- the current context.JsonBindingException
JsonStreamException
Exception
Copyright © 2019. All rights reserved.