Class JsonWriter<T>

java.lang.Object
io.micronaut.pulsar.schemas.json.JsonWriter<T>
Type Parameters:
T - POJO type to process.
All Implemented Interfaces:
org.apache.pulsar.client.api.schema.SchemaWriter<T>

public final class JsonWriter<T> extends Object implements org.apache.pulsar.client.api.schema.SchemaWriter<T>
JSON Schema Writer to allow using JsonMapper from Micronaut instead of shaded one in Pulsar library.
Since:
1.0
Author:
Haris Secic
  • Constructor Details

    • JsonWriter

      public JsonWriter(io.micronaut.json.JsonMapper mapper)
      Parameters:
      mapper - new json mapper
      Since:
      1.1.0
  • Method Details

    • write

      public byte[] write(T message)
      Specified by:
      write in interface org.apache.pulsar.client.api.schema.SchemaWriter<T>