diff --git a/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonAvroConverter.java b/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonAvroConverter.java index d821000..c577a58 100644 --- a/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonAvroConverter.java +++ b/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonAvroConverter.java @@ -21,8 +21,10 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.Serializable; -public class JsonAvroConverter { +public class JsonAvroConverter implements Serializable { + private static final long serialVersionUID = 9007270280918300540L; private JsonGenericRecordReader recordReader; public JsonAvroConverter() { diff --git a/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonGenericRecordReader.java b/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonGenericRecordReader.java index 754e1a0..629a6a4 100644 --- a/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonGenericRecordReader.java +++ b/converter/src/main/java/tech/allegro/schema/json2avro/converter/JsonGenericRecordReader.java @@ -1,5 +1,6 @@ package tech.allegro.schema.json2avro.converter; +import java.io.Serializable; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import org.apache.avro.AvroRuntimeException; @@ -24,8 +25,9 @@ import static tech.allegro.schema.json2avro.converter.AvroTypeExceptions.typeException; import static tech.allegro.schema.json2avro.converter.AvroTypeExceptions.unionException; -public class JsonGenericRecordReader { +public class JsonGenericRecordReader implements Serializable { private static final Object INCOMPATIBLE = new Object(); + private static final long serialVersionUID = 4645457833824828111L; private final ObjectMapper mapper; private final UnknownFieldListener unknownFieldListener;