public static <T> void writeTo(OutputStream out, T message, Schema<T> schema,
            boolean numeric) throws IOException
    {
        final IOContext context = new IOContext(DEFAULT_JSON_FACTORY._getBufferRecycler(),
                out, false);

        final JsonGenerator generator = newJsonGenerator(out,
                context.allocWriteEncodingBuffer(), 0, true, context);

        /*
         * final JsonGenerator generator = DEFAULT_JSON_FACTORY.createJsonGenerator(out, JsonEncoding.UTF8);
         */
        try
        {
            writeTo(generator, message, schema, numeric);
        }
        finally
        {
            generator.close();
        }
    }
Serializes the {@code message} into an {@link OutputStream} using the given {@code schema}.
protostuff-json/src/main/java/io/protostuff/JsonIOUtil.java