Package co.elastic.clients.json
Class JsonpMapperBase
java.lang.Object
co.elastic.clients.json.JsonpMapperBase
- All Implemented Interfaces:
JsonpMapper
- Direct Known Subclasses:
Jackson3JsonpMapper,JacksonJsonpMapper,JsonbJsonpMapper,SimpleJsonpMapper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JsonpMapperBaseaddAttribute(String name, Object value) Updates attributes to a copy of the current ones with an additional key/value pair.<T> TGet a named attribute associated to this mapper.<T> Tdeserialize(jakarta.json.stream.JsonParser parser, Type type) Deserialize an object, given its type.<T> Tdeserialize(jakarta.json.stream.JsonParser parser, Type type, jakarta.json.stream.JsonParser.Event event) Deserialize an object, given its type and the current event the parser is at.static <T> JsonpDeserializer<T>findDeserializer(Class<T> clazz) Find a built-in deserializer for a given class, if any.static <T> JsonpDeserializer<T>findDeserializer(Type type) Find a built-in deserializer for a given type, if any.static <T> JsonpSerializer<T>findSerializer(T value) protected abstract <T> JsonpDeserializer<T>getDefaultDeserializer(Type type) Get a serializer when none of the builtin ones are applicableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.elastic.clients.json.JsonpMapper
attribute, deserialize, deserialize, ignoreUnknownFields, jsonProvider, serialize, withAttribute
-
Constructor Details
-
JsonpMapperBase
public JsonpMapperBase()
-
-
Method Details
-
getDefaultDeserializer
Get a serializer when none of the builtin ones are applicable -
attribute
Description copied from interface:JsonpMapperGet a named attribute associated to this mapper.- Specified by:
attributein interfaceJsonpMapper
-
addAttribute
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) -
deserialize
Description copied from interface:JsonpMapperDeserialize an object, given its type.- Specified by:
deserializein interfaceJsonpMapper
-
deserialize
public <T> T deserialize(jakarta.json.stream.JsonParser parser, Type type, jakarta.json.stream.JsonParser.Event event) Description copied from interface:JsonpMapperDeserialize an object, given its type and the current event the parser is at.- Specified by:
deserializein interfaceJsonpMapper
-
findDeserializer
Find a built-in deserializer for a given class, if any. -
findDeserializer
Find a built-in deserializer for a given type, if any. -
findSerializer
-