Class MapDeserializer<T extends java.util.Map<?,​?>>

  • 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 for Map fields. 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 Detail

      • MapDeserializer

        protected MapDeserializer​(DeserializerBuilder builder)
        Create instance of current item with its builder.
        Parameters:
        builder - DeserializerBuilder used to build this instance
    • Method Detail

      • appendResult

        public void appendResult​(java.lang.Object result)
        Description copied from class: AbstractContainerDeserializer
        After 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:
        appendResult in class AbstractContainerDeserializer<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: AbstractContainerDeserializer
        Determine 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:
        deserializeNext in class AbstractContainerDeserializer<T extends java.util.Map<?,​?>>
        Parameters:
        parser - Json parser.
        context - Current unmarshalling context.