GitHub user shan-96 added a comment to the discussion: JSONSchema should works with generic (parameterized type) POJO/DTO.
@vamsi360 We are trying to write to Avro Files using version 1.8.3-ppe-9.10 We are writing a java object from memory to a specified file using `DataFileWriter`. While building the schema of the POJO at runtime, we call... ``` private static Schema getJsonSchema(Class c) { Schema s = ReflectData.AllowNull.get().getSchema(c); AvroSchema avroSchema = new AvroSchema(s); return avroSchema.getAvroSchema(); } ``` However, we still get the same exception as mentioned above which we got through maven released version of Avro (1.8) Our schema (POJO) looks like this: ``` public RawData extends Data<String>{ private static final long serialVersionUID = 1L; private long field 1; private String field 2; } public abstract class Data<T> implements Serializable { private static final long serialVersionUID = 1L; private String dataType; private T id; } ``` We want to define `AvroSchema `for `RawData.class` cc: @rohts-patil GitHub link: https://github.com/apache/pulsar/discussions/18849#discussioncomment-4352453 ---- This is an automatically sent email for dev@pulsar.apache.org. To unsubscribe, please send an email to: dev-unsubscr...@pulsar.apache.org