public static <T> void writeObject(Writer writer, T object) throws IOException {
        gson.toJson(object, object == null ? Object.class : object.getClass(), gson.newJsonWriter(writer));
    }
Utility class for reading and writing objects in JSON format.
clickhouse-data/src/main/java/com/clickhouse/data/format/JsonStreamUtils.java