Class JsonpMapperBase

java.lang.Object
co.elastic.clients.json.JsonpMapperBase
All Implemented Interfaces:
JsonpMapper
Direct Known Subclasses:
JacksonJsonpMapper, JsonbJsonpMapper, SimpleJsonpMapper

public abstract class JsonpMapperBase extends Object implements JsonpMapper
  • Constructor Details

    • JsonpMapperBase

      public JsonpMapperBase()
  • Method Details

    • getDefaultDeserializer

      protected abstract <T> JsonpDeserializer<T> getDefaultDeserializer(Type type)
      Get a serializer when none of the builtin ones are applicable
    • attribute

      @Nullable public <T> T attribute(String name)
      Description copied from interface: JsonpMapper
      Get a named attribute associated to this mapper.
      Specified by:
      attribute in interface JsonpMapper
    • addAttribute

      protected JsonpMapperBase addAttribute(String name, Object value)
      Updates attributes to a copy of the current ones with an additional key/value pair. Mutates the current mapper, intended to be used in implementations of JsonpMapper.withAttribute(String, Object)
    • deserialize

      public <T> T deserialize(jakarta.json.stream.JsonParser parser, Type type)
      Description copied from interface: JsonpMapper
      Deserialize an object, given its type.
      Specified by:
      deserialize in interface JsonpMapper
    • findDeserializer

      @Nullable public static <T> JsonpDeserializer<T> findDeserializer(Class<T> clazz)
    • findDeserializer

      @Nullable public static <T> JsonpDeserializer<T> findDeserializer(Type type)
    • findSerializer

      @Nullable public static <T> JsonpSerializer<T> findSerializer(T value)