Package co.elastic.clients.json
Class DelegatingJsonpMapper
java.lang.Object
co.elastic.clients.json.DelegatingJsonpMapper
- All Implemented Interfaces:
JsonpMapper
public abstract class DelegatingJsonpMapper extends java.lang.Object implements JsonpMapper
-
Field Summary
Fields Modifier and Type Field Description protected JsonpMapper
mapper
-
Constructor Summary
Constructors Constructor Description DelegatingJsonpMapper(JsonpMapper mapper)
-
Method Summary
Modifier and Type Method Description <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.boolean
ignoreUnknownFields()
Should object parsers in the API client be lenient and silently ignore unknown fields?jakarta.json.spi.JsonProvider
jsonProvider()
Return the JSON-P provider, to create JSON parsers and generators.<T> void
serialize(T value, jakarta.json.stream.JsonGenerator generator)
Serialize an object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface co.elastic.clients.json.JsonpMapper
attribute, withAttribute
-
Field Details
-
mapper
-
-
Constructor Details
-
DelegatingJsonpMapper
-
-
Method Details
-
jsonProvider
public jakarta.json.spi.JsonProvider jsonProvider()Description copied from interface:JsonpMapper
Return the JSON-P provider, to create JSON parsers and generators.- Specified by:
jsonProvider
in interfaceJsonpMapper
-
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
-
serialize
public <T> void serialize(T value, jakarta.json.stream.JsonGenerator generator)Description copied from interface:JsonpMapper
Serialize an object.- Specified by:
serialize
in interfaceJsonpMapper
-
ignoreUnknownFields
public boolean ignoreUnknownFields()Description copied from interface:JsonpMapper
Should object parsers in the API client be lenient and silently ignore unknown fields?- Specified by:
ignoreUnknownFields
in interfaceJsonpMapper
- Returns:
true
by default.
-
attribute
@Nullable 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
-