@HandleClassMetadata public abstract static class DefaultConverters.MapConverter<K,V> extends Object implements Converter<Map<K,V>>
Constructor and Description |
---|
MapConverter(DefaultConverters.KeyAdapter<K> keyAdapter,
Converter<V> valueConverter) |
Modifier and Type | Method and Description |
---|---|
protected abstract Map<K,V> |
create() |
Map<K,V> |
deserialize(ObjectReader reader,
Context ctx) |
void |
serialize(Map<K,V> obj,
ObjectWriter writer,
Context ctx) |
public MapConverter(DefaultConverters.KeyAdapter<K> keyAdapter, Converter<V> valueConverter)
public Map<K,V> deserialize(ObjectReader reader, Context ctx) throws Exception
deserialize
in interface Converter<Map<K,V>>
deserialize
in interface Deserializer<Map<K,V>>
reader
- used to read data from.ctx
- the current context.JsonBindingException
JsonStreamException
Exception
public void serialize(Map<K,V> obj, ObjectWriter writer, Context ctx) throws Exception
serialize
in interface Converter<Map<K,V>>
serialize
in interface Serializer<Map<K,V>>
obj
- 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
Copyright © 2019. All rights reserved.