class JsonFullRowSerializer implements RowSerializer {

    @Override
    public String serialize(byte[] rowKey, ResultCell[] cells) {
        final String rowId = RowSerializerUtil.getRowId(rowKey, decodeCharset, base64encode);

        final StringBuilder jsonBuilder = new StringBuilder();
        jsonBuilder.append("{");

        jsonBuilder.append("\"row\":");
        appendString(jsonBuilder, rowId, base64encode);

        jsonBuilder.append(", \"cells\": [");
        int i = 0;
        for (final ResultCell cell : cells) {
            final String cellFamily = RowSerializerUtil.getCellFamily(cell, decodeCharset, base64encode);
            final String cellQualifier = RowSerializerUtil.getCellQualifier(cell, decodeCharset, base64encode);
            final String cellValue = RowSerializerUtil.getCellValue(cell, decodeCharset, base64encode);

            if (i > 0) {
                jsonBuilder.append(", ");
            }

            // start cell
            jsonBuilder.append("{");

            jsonBuilder.append("\"fam\":");
            appendString(jsonBuilder, cellFamily, base64encode);

            jsonBuilder.append(",\"qual\":");
            appendString(jsonBuilder, cellQualifier, base64encode);

            jsonBuilder.append(",\"val\":");
            appendString(jsonBuilder, cellValue, base64encode);

            jsonBuilder.append(",\"ts\":");
            jsonBuilder.append(String.valueOf(cell.getTimestamp()));

            // end cell
            jsonBuilder.append("}");
            i++;
        }

        // end cell array
        jsonBuilder.append("]");

        // end overall document
        jsonBuilder.append("}");
        return jsonBuilder.toString();
    }

    public  JsonFullRowSerializer(final Charset decodeCharset, final Charset encodeCharset);
    public  JsonFullRowSerializer(final Charset decodeCharset, final Charset encodeCharset, final boolean base64encode);

}