@Override
    public void writeInt64(int fieldNumber, long value, boolean repeated) throws IOException
    {
        final WriteSink sink = this.sink;
        if (lastNumber == fieldNumber)
        {
            // repeated field
            tail = sink.writeStrFromLong(
                    value,
                    this,
                    sink.writeByte(
                            COMMA,
                            this,
                            tail));
            return;
        }

        tail = sink.writeStrFromLong(
                value,
                this,
                writeKey(
                        fieldNumber,
                        sink,
                        repeated ? KEY_SUFFIX_ARRAY : KEY_SUFFIX));

        lastNumber = fieldNumber;
        lastRepeated = repeated;
    }
Returns true if the last written field was a repeated field.
protostuff-json/src/main/java/io/protostuff/JsonXOutput.java