class AvroSerializer implements StringSerializer {
    @Override
    public String serialize(Object obj) throws IOException {<FILL_FUNCTION_BODY>}
}

        DatumWriter datumWriter = new SpecificDatumWriter(obj.getClass());
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        BinaryEncoder encoder = EncoderFactory.get().binaryEncoder(out, null);

        datumWriter.write(obj, encoder);

        return out.toString();
    
<no_super_class>