Class MapEntriesArrayDeserializer<K,V>
java.lang.Object
org.eclipse.yasson.internal.serializer.AbstractItem<Map<K,V>>
org.eclipse.yasson.internal.serializer.MapEntriesArrayDeserializer<K,V>
- All Implemented Interfaces:
javax.json.bind.serializer.JsonbDeserializer<Map<K,V>>
,RuntimeTypeInfo
,CurrentItem<Map<K,V>>
public class MapEntriesArrayDeserializer<K,V>
extends AbstractItem<Map<K,V>>
implements javax.json.bind.serializer.JsonbDeserializer<Map<K,V>>
De-serialize JSON array of map entries JSON objects as
Map
.
JSON array of map entries JSON objects:
[ { "key": JsonValue, "value": JsonValue }, ... ]
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize(javax.json.stream.JsonParser parser, javax.json.bind.serializer.DeserializationContext context, Type rtType)
De-serialize container stored as JSON structure.void
startArray(org.eclipse.yasson.internal.serializer.MapEntriesArrayDeserializer.Context ctx, javax.json.stream.JsonParser.Event event)
De-serialize JSON structure following beginning of JSON Array ('[').Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractItem
getClassModel, getRuntimeType, getWrapper
-
Method Details
-
deserialize
public Map<K,V> deserialize(javax.json.stream.JsonParser parser, javax.json.bind.serializer.DeserializationContext context, Type rtType)De-serialize container stored as JSON structure. Reads JSON tokens from JSON parser and calls corresponding handler method for each of the tokens. Implementing class shall process those tokens and build container instance ofT
to be returned.- Specified by:
deserialize
in interfacejavax.json.bind.serializer.JsonbDeserializer<K>
- Parameters:
parser
- JSON parsercontext
- de-serialization contextrtType
- type of returned instance- Returns:
Map
instance with content of source JSON structure
-
startArray
public void startArray(org.eclipse.yasson.internal.serializer.MapEntriesArrayDeserializer.Context ctx, javax.json.stream.JsonParser.Event event)De-serialize JSON structure following beginning of JSON Array ('[').- Parameters:
ctx
- parser contextevent
- JSON parser token (event)
-