public void pushValue(Schema<?> schema, int fieldNumber, Value value, boolean repeated)
    {

        if (lastNumber == fieldNumber && lastRepeated)
        {
            // repeated field
            getLastArray().add(value);
            return;
        }

        if (numeric)
        {
            kvs.add(new ImmutableLongValueImpl(fieldNumber));
        }
        else
        {
            kvs.add(new ImmutableStringValueImpl(schema.getFieldName(fieldNumber)));
        }

        if (repeated)
        {
            ArrayValueImpl array = new ArrayValueImpl();
            array.add(value);

            kvs.add(array);
        }
        else
        {
            kvs.add(value);
        }

        lastNumber = fieldNumber;
        lastRepeated = repeated;

    }
Single object generator for msgpack.

@author Alex Shvid
protostuff-msgpack/src/main/java/io/protostuff/MsgpackGenerator.java