Package org.opensearch.client.json
Class JsonpMapperBase
- java.lang.Object
-
- org.opensearch.client.json.JsonpMapperBase
-
- All Implemented Interfaces:
JsonpMapper
- Direct Known Subclasses:
JacksonJsonpMapper
,JsonbJsonpMapper
public abstract class JsonpMapperBase extends java.lang.Object implements JsonpMapper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
JsonpMapperBase.JsonpSerializableSerializer<T extends JsonpSerializable>
protected static class
JsonpMapperBase.JsonpValueSerializer
-
Constructor Summary
Constructors Modifier Constructor Description protected
JsonpMapperBase()
protected
JsonpMapperBase(JsonpMapperBase o)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected JsonpMapperBase
addAttribute(java.lang.String name, java.lang.Object value)
Updates attributes to a copy of the current ones with an additional key/value pair.<T> T
attribute(java.lang.String name)
Get a named attribute associated to this mapper.<T> T
deserialize(jakarta.json.stream.JsonParser parser, java.lang.Class<T> clazz)
Deserialize an object, given its class.static <T> JsonpDeserializer<T>
findDeserializer(java.lang.Class<T> clazz)
static <T> JsonpSerializer<T>
findSerializer(T value)
protected abstract <T> JsonpDeserializer<T>
getDefaultDeserializer(java.lang.Class<T> clazz)
Get a serializer when none of the builtin ones are applicable-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.json.JsonpMapper
attribute, ignoreUnknownFields, jsonProvider, serialize, withAttribute
-
-
-
-
Constructor Detail
-
JsonpMapperBase
protected JsonpMapperBase()
-
JsonpMapperBase
protected JsonpMapperBase(JsonpMapperBase o)
-
-
Method Detail
-
attribute
public <T> T attribute(java.lang.String name)
Description copied from interface:JsonpMapper
Get a named attribute associated to this mapper.- Specified by:
attribute
in interfaceJsonpMapper
-
addAttribute
protected JsonpMapperBase addAttribute(java.lang.String name, java.lang.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 ofJsonpMapper.withAttribute(String, Object)
-
getDefaultDeserializer
protected abstract <T> JsonpDeserializer<T> getDefaultDeserializer(java.lang.Class<T> clazz)
Get a serializer when none of the builtin ones are applicable
-
deserialize
public <T> T deserialize(jakarta.json.stream.JsonParser parser, java.lang.Class<T> clazz)
Description copied from interface:JsonpMapper
Deserialize an object, given its class.- Specified by:
deserialize
in interfaceJsonpMapper
-
findDeserializer
@Nullable public static <T> JsonpDeserializer<T> findDeserializer(java.lang.Class<T> clazz)
-
findSerializer
@Nullable public static <T> JsonpSerializer<T> findSerializer(T value)
-
-