class CompactJsonWriter implements JsonWriter {

    @Override
    public void write( Object object,
                       OutputStream stream ) throws IOException {
        Writer writer = new BufferedWriter(new OutputStreamWriter(stream, Json.UTF8));
        write(object, writer);
        writer.flush();
    }

}