Package co.elastic.clients.json
Class SimpleJsonpMapper
java.lang.Object
co.elastic.clients.json.JsonpMapperBase
co.elastic.clients.json.SimpleJsonpMapper
- All Implemented Interfaces:
- JsonpMapper
A simple implementation of 
JsonpMapper that only handles classes of the Java API client.
 
 To handle application classes serialization and deserialization, consider using JacksonJsonpMapper or
 JsonbJsonpMapper.
- 
Nested Class SummaryNested classes/interfaces inherited from class co.elastic.clients.json.JsonpMapperBaseJsonpMapperBase.JsonpSerializableSerializer<T extends JsonpSerializable>, JsonpMapperBase.JsonpValueSerializer
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected <T> JsonpDeserializer<T>getDefaultDeserializer(Type type) Get a serializer when none of the builtin ones are applicableprotected <T> JsonpSerializer<T>getDefaultSerializer(T value) booleanShould object parsers in the API client be lenient and silently ignore unknown fields?jakarta.json.spi.JsonProviderReturn the JSON-P provider, to create JSON parsers and generators.<T> voidserialize(T value, jakarta.json.stream.JsonGenerator generator) Serialize an object.<T> JsonpMapperwithAttribute(String name, T value) Create a new mapper with an additional attribute.Methods inherited from class co.elastic.clients.json.JsonpMapperBaseaddAttribute, attribute, deserialize, deserialize, findDeserializer, findDeserializer, findSerializerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.elastic.clients.json.JsonpMapperattribute, deserialize, deserialize
- 
Field Details- 
INSTANCE
- 
INSTANCE_REJECT_UNKNOWN_FIELDS
 
- 
- 
Constructor Details- 
SimpleJsonpMapperpublic SimpleJsonpMapper(boolean ignoreUnknownFields) 
- 
SimpleJsonpMapperpublic SimpleJsonpMapper()
 
- 
- 
Method Details- 
withAttributeDescription copied from interface:JsonpMapperCreate a new mapper with an additional attribute.The JsonpMapperFeaturesclass contains the names of attributes that all implementations ofJsonpMappermust implement.- See Also:
 
- 
ignoreUnknownFieldspublic boolean ignoreUnknownFields()Description copied from interface:JsonpMapperShould object parsers in the API client be lenient and silently ignore unknown fields?- Returns:
- trueby default.
 
- 
jsonProviderpublic jakarta.json.spi.JsonProvider jsonProvider()Description copied from interface:JsonpMapperReturn the JSON-P provider, to create JSON parsers and generators.
- 
serializepublic <T> void serialize(T value, jakarta.json.stream.JsonGenerator generator) Description copied from interface:JsonpMapperSerialize an object.
- 
getDefaultDeserializerDescription copied from class:JsonpMapperBaseGet a serializer when none of the builtin ones are applicable- Specified by:
- getDefaultDeserializerin class- JsonpMapperBase
 
- 
getDefaultSerializer
 
-