Package dev.drtheo.autojson.schema.util
Class AbstractMapSchema
-
- All Implemented Interfaces:
-
dev.drtheo.autojson.schema.base.ObjectSchema,dev.drtheo.autojson.schema.base.Schema
public abstract class AbstractMapSchema<K, V> implements ObjectSchema<T>
The base map schema.
-
-
Constructor Summary
Constructors Constructor Description AbstractMapSchema(SchemaHolder holder, ParameterizedType type)
-
Method Summary
Modifier and Type Method Description <To> voidserialize(JsonAdapter<Object, To> adapter, JsonSerializationContext.Obj ctx, Map<K, V> map)Map<K, V>instantiate()<To> voiddeserialize(JsonAdapter<Object, To> adapter, JsonDeserializationContext ctx, Map<K, V> map, String key)-
Methods inherited from class dev.drtheo.autojson.schema.base.ObjectSchema
serialize, type -
Methods inherited from class dev.drtheo.autojson.schema.base.Schema
asArray, asObject, asPrimitive, asWrapper, createInstance -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AbstractMapSchema
AbstractMapSchema(SchemaHolder holder, ParameterizedType type)
-
-
Method Detail
-
serialize
<To> void serialize(JsonAdapter<Object, To> adapter, JsonSerializationContext.Obj ctx, Map<K, V> map)
- Parameters:
adapter- the adapter used to serialize this object.ctx- the serialization context.
-
instantiate
Map<K, V> instantiate()
- Returns:
A new instance of the object this schema serializes.
-
deserialize
<To> void deserialize(JsonAdapter<Object, To> adapter, JsonDeserializationContext ctx, Map<K, V> map, String key)
- Parameters:
adapter- the adapter used to deserialize this object.ctx- the deserialization context.
-
-
-
-