@Override
    protected <T> byte[] toByteArray(T message, Schema<T> schema)
    {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        try
        {
            JsonXIOUtil.writeTo(out, message, schema, true, buf());
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
        return out.toByteArray();
    }
Json standard tests (numeric) using {@link JsonXOutput} (streamed).

@author David Yu
@created Oct 11, 2010
protostuff-json/src/test/java/io/protostuff/JsonXStreamedNumericStandardTest.java