class JavaBeanSerializer
        implements ObjectSerializer {
    private final ObjectWriter raw;

    public JavaBeanSerializer(ObjectWriter raw) {
        this.raw = raw;
    }

    @Override
    public void write(
            JSONSerializer serializer,
            Object object,
            Object fieldName,
            Type fieldType,
            int features
    ) throws IOException {<FILL_FUNCTION_BODY>}

    public Object getFieldValue(Object object, String key) {
        FieldWriter fieldWriter = raw.getFieldWriter(key);
        if (fieldWriter == null) {
            return null;
        }
        return fieldWriter.getFieldValue(object);
    }
}

        JSONWriter jsonWriter = serializer.out.raw;
        raw.write(jsonWriter, object, fieldName, fieldType, 0L);
    
<no_super_class>