Class JsonSerde<T>
java.lang.Object
org.springframework.kafka.support.serializer.JsonSerde<T>
- Type Parameters:
T
- target class for serialization/deserialization
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.kafka.common.serialization.Serde<T>
@Deprecated(forRemoval=true,
since="4.0")
public class JsonSerde<T>
extends Object
implements org.apache.kafka.common.serialization.Serde<T>
Deprecated, for removal: This API element is subject to removal in a future version.
A
Serde
that provides serialization and
deserialization in JSON format.
The implementation delegates to underlying JsonSerializer
and
JsonDeserializer
implementations.
- Since:
- 1.1.5
- Author:
- Marius Bogoevici, Elliot Kennedy, Gary Russell, Ivan Ponomarev
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.JsonSerde
(@Nullable com.fasterxml.jackson.core.type.TypeReference<? super T> targetType, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version.JsonSerde
(@Nullable com.fasterxml.jackson.databind.JavaType targetType) Deprecated, for removal: This API element is subject to removal in a future version.JsonSerde
(@Nullable com.fasterxml.jackson.databind.JavaType targetTypeArg, @Nullable com.fasterxml.jackson.databind.ObjectMapper objectMapperArg) Deprecated, for removal: This API element is subject to removal in a future version.JsonSerde
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.JsonSerde
(@Nullable Class<? super T> targetType, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version.JsonSerde
(JsonSerializer<T> jsonSerializer, JsonDeserializer<T> jsonDeserializer) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.<X> JsonSerde
<X> copyWithType
(com.fasterxml.jackson.core.type.TypeReference<? super X> newTargetType) Deprecated, for removal: This API element is subject to removal in a future version.Copies this serde with same configuration, except new target type reference is used.<X> JsonSerde
<X> copyWithType
(com.fasterxml.jackson.databind.JavaType newTargetType) Deprecated, for removal: This API element is subject to removal in a future version.Copies this serde with same configuration, except new target java type is used.<X> JsonSerde
<X> copyWithType
(Class<? super X> newTargetType) Deprecated, for removal: This API element is subject to removal in a future version.Copies this serde with same configuration, except new target type is used.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Don't remove type information headers after deserialization.forKeys()
Deprecated, for removal: This API element is subject to removal in a future version.Designate this Serde for serializing/deserializing keys (default is values).Deprecated, for removal: This API element is subject to removal in a future version.Ignore type information headers and use the configured target class.Deprecated, for removal: This API element is subject to removal in a future version.Configure the serializer to not add type information.Deprecated, for removal: This API element is subject to removal in a future version.typeMapper
(Jackson2JavaTypeMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.Use the suppliedJackson2JavaTypeMapper
.
-
Constructor Details
-
JsonSerde
public JsonSerde()Deprecated, for removal: This API element is subject to removal in a future version. -
JsonSerde
-
JsonSerde
Deprecated, for removal: This API element is subject to removal in a future version. -
JsonSerde
public JsonSerde(@Nullable com.fasterxml.jackson.databind.JavaType targetType) Deprecated, for removal: This API element is subject to removal in a future version. -
JsonSerde
public JsonSerde(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version. -
JsonSerde
public JsonSerde(@Nullable com.fasterxml.jackson.core.type.TypeReference<? super T> targetType, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version. -
JsonSerde
-
JsonSerde
public JsonSerde(@Nullable com.fasterxml.jackson.databind.JavaType targetTypeArg, @Nullable com.fasterxml.jackson.databind.ObjectMapper objectMapperArg) Deprecated, for removal: This API element is subject to removal in a future version. -
JsonSerde
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
configure
-
close
public void close()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.kafka.common.serialization.Serde<T>
-
serializer
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
serializer
in interfaceorg.apache.kafka.common.serialization.Serde<T>
-
deserializer
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deserializer
in interfaceorg.apache.kafka.common.serialization.Serde<T>
-
copyWithType
Deprecated, for removal: This API element is subject to removal in a future version.Copies this serde with same configuration, except new target type is used.- Type Parameters:
X
- new deserialization result type and serialization source type- Parameters:
newTargetType
- type reference forced for serialization, and used as default for deserialization, not null- Returns:
- new instance of serde with type changes
- Since:
- 2.6
-
copyWithType
public <X> JsonSerde<X> copyWithType(com.fasterxml.jackson.core.type.TypeReference<? super X> newTargetType) Deprecated, for removal: This API element is subject to removal in a future version.Copies this serde with same configuration, except new target type reference is used.- Type Parameters:
X
- new deserialization result type and serialization source type- Parameters:
newTargetType
- type reference forced for serialization, and used as default for deserialization, not null- Returns:
- new instance of serde with type changes
- Since:
- 2.6
-
copyWithType
Deprecated, for removal: This API element is subject to removal in a future version.Copies this serde with same configuration, except new target java type is used.- Type Parameters:
X
- new deserialization result type and serialization source type- Parameters:
newTargetType
- java type forced for serialization, and used as default for deserialization, not null- Returns:
- new instance of serde with type changes
- Since:
- 2.6
-
forKeys
-
noTypeInfo
-
dontRemoveTypeHeaders
-
ignoreTypeHeaders
-
typeMapper
Deprecated, for removal: This API element is subject to removal in a future version.Use the suppliedJackson2JavaTypeMapper
.- Parameters:
mapper
- the mapper.- Returns:
- the serde.
- Since:
- 2.3
-
JacksonJsonSerde
for Jackson 3.