public class Json
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_JSON |
Constructor and Description |
---|
Json() |
Modifier and Type | Method and Description |
---|---|
static <T> Deserializer<T> |
binaryDeserializer(java.lang.Class<T> typeParameterClass)
Get a
Deserializer which can deserialize cloudevents using binary encoding. |
static <T> Serializer<T> |
binarySerializer()
Get a
Serializer which can serialize cloudevents using binary encoding. |
static com.fasterxml.jackson.databind.ObjectMapper |
createJacksonMapper() |
static <T> Deserializer<T> |
structuredDeserializer(java.lang.Class<T> typeParameterClass)
Get a
Deserializer which can serialize cloudevents using structured encoding. |
static <T> Serializer<T> |
structuredSerializer()
Get a
Serializer which can serialize cloudevents using structured encoding. |
static byte[] |
uncheckedEncode(com.fasterxml.jackson.databind.ObjectMapper mapper,
java.lang.Object obj) |
public static final java.lang.String APPLICATION_JSON
public static com.fasterxml.jackson.databind.ObjectMapper createJacksonMapper()
public static <T> Serializer<T> binarySerializer()
Serializer
which can serialize cloudevents using binary encoding.
https://github.com/cloudevents/spec/blob/v1.0/kafka-protocol-binding.md#32-binary-content-modeBinarySerializer
public static <T> Deserializer<T> binaryDeserializer(java.lang.Class<T> typeParameterClass)
Deserializer
which can deserialize cloudevents using binary encoding.
https://github.com/cloudevents/spec/blob/v1.0/kafka-protocol-binding.md#32-binary-content-modeBinaryDeserializer
public static <T> Serializer<T> structuredSerializer()
Serializer
which can serialize cloudevents using structured encoding.
https://github.com/cloudevents/spec/blob/v1.0/kafka-protocol-binding.md#33-structured-content-modeStructuredSerializer
public static byte[] uncheckedEncode(com.fasterxml.jackson.databind.ObjectMapper mapper, java.lang.Object obj)
public static <T> Deserializer<T> structuredDeserializer(java.lang.Class<T> typeParameterClass)
Deserializer
which can serialize cloudevents using structured encoding.
https://github.com/cloudevents/spec/blob/v1.0/kafka-protocol-binding.md#33-structured-content-modeStructuredDeserializer