Class ValueBodyDeserializer<ObjectType>

java.lang.Object
org.opensearch.client.json.JsonpDeserializer<ObjectType>
org.opensearch.client.json.DelegatingDeserializer<ObjectType>
org.opensearch.client.json.ValueBodyDeserializer<ObjectType>

public class ValueBodyDeserializer<ObjectType>
extends DelegatingDeserializer<ObjectType>
Deserializer for bodies of type `ValueOf`. It is modelled after ObjectDeserializer (with an add method) to fit into the same code generation structure with no additional runtime cost.
  • Constructor Details

  • Method Details

    • deserialize

      public ObjectType deserialize​(jakarta.json.stream.JsonParser parser, JsonpMapper mapper, jakarta.json.stream.JsonParser.Event event)
      Description copied from class: JsonpDeserializer
      Parse a value. The value starts at the current state in the json stream. This method will usually start with ensureAccepts(parser, event) to ensure correctness of the starting state.
      Specified by:
      deserialize in class JsonpDeserializer<ObjectType>
      Parameters:
      parser - the json parser
      mapper - the jsonp mapper
      event - the current state of parser, which must be part of JsonpDeserializer.acceptedEvents
      Returns:
      the parsed value
    • add

      public <FieldType> void add​(java.util.function.BiConsumer<ObjectType,​FieldType> setter, JsonpDeserializer<FieldType> valueParser, java.lang.String name, java.lang.String... deprecatedNames)
      Specified by:
      add in class DelegatingDeserializer<ObjectType>