Class MapDeserializer<T extends java.util.Map<?,?>>
- java.lang.Object
-
- org.eclipse.yasson.internal.serializer.AbstractItem<T>
-
- org.eclipse.yasson.internal.serializer.AbstractContainerDeserializer<T>
-
- org.eclipse.yasson.internal.serializer.MapDeserializer<T>
-
- Type Parameters:
T- map type
- All Implemented Interfaces:
javax.json.bind.serializer.JsonbDeserializer<T>,RuntimeTypeInfo,CurrentItem<T>,EmbeddedItem
public class MapDeserializer<T extends java.util.Map<?,?>> extends AbstractContainerDeserializer<T> implements EmbeddedItem
Item implementation forMapfields. According to JSON specification object can have only string keys, given that maps could only be parsed from JSON objects, implementation is bound to String type.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMapDeserializer(DeserializerBuilder builder)Create instance of current item with its builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendResult(java.lang.Object result)After object is transitively deserialized from JSON, "append" it to its wrapper.protected voiddeserializeNext(javax.json.stream.JsonParser parser, Unmarshaller context)Determine class mappings and create an instance of a new deserializer.TgetInstance(Unmarshaller unmarshaller)Creates and initializes an instance of deserializing item.protected JsonbRiParser.LevelContextmoveToFirst(JsonbParser parser)Move to first event for current deserializer structure.-
Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractContainerDeserializer
convertNullToOptionalEmpty, deserialize, deserializeInternal, newCollectionOrMapItem, newUnmarshallerItemBuilder
-
Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractItem
getClassModel, getRuntimeType, getWrapper
-
-
-
-
Constructor Detail
-
MapDeserializer
protected MapDeserializer(DeserializerBuilder builder)
Create instance of current item with its builder.- Parameters:
builder-DeserializerBuilderused to build this instance
-
-
Method Detail
-
getInstance
public T getInstance(Unmarshaller unmarshaller)
Description copied from class:AbstractContainerDeserializerCreates and initializes an instance of deserializing item.- Specified by:
getInstancein classAbstractContainerDeserializer<T extends java.util.Map<?,?>>- Parameters:
unmarshaller- Current deserialization context.- Returns:
- An instance of deserializing item.
-
appendResult
public void appendResult(java.lang.Object result)
Description copied from class:AbstractContainerDeserializerAfter object is transitively deserialized from JSON, "append" it to its wrapper. In case of a field set value to field, in case of collections or other embedded objects use methods provided.- Specified by:
appendResultin classAbstractContainerDeserializer<T extends java.util.Map<?,?>>- Parameters:
result- An instance result of an item.
-
deserializeNext
protected void deserializeNext(javax.json.stream.JsonParser parser, Unmarshaller context)Description copied from class:AbstractContainerDeserializerDetermine class mappings and create an instance of a new deserializer. Currently processed deserializer is pushed to stack, for waiting till new object is finished.- Specified by:
deserializeNextin classAbstractContainerDeserializer<T extends java.util.Map<?,?>>- Parameters:
parser- Json parser.context- Current unmarshalling context.
-
moveToFirst
protected JsonbRiParser.LevelContext moveToFirst(JsonbParser parser)
Description copied from class:AbstractContainerDeserializerMove to first event for current deserializer structure.- Specified by:
moveToFirstin classAbstractContainerDeserializer<T extends java.util.Map<?,?>>- Parameters:
parser- Json parser.- Returns:
- First event.
-
-