Hi All,

I have the following code.

public String byte[] toJson(Schema schema, GenericRecord genericRecord) throws
IOException {

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schema);
    JsonEncoder encoder = EncoderFactory.get().jsonEncoder(schema, baos);
    writer.write(genericRecord, encoder);
    return new String(baos.toByteArray());

As you can see I am passing a Generic Record and I just need a String

without the types.

Right now The function above generates something like this

What I need is this