public static <T> void writeObject(OutputStream output, Charset charset, T object) throws IOException {
        OutputStreamWriter writer = new OutputStreamWriter(output, charset);
        writeObject(writer, object);
        writer.flush();
    }
Utility class for reading and writing objects in JSON format.
clickhouse-data/src/main/java/com/clickhouse/data/format/JsonStreamUtils.java