public void testBar() throws Exception
    {
        for (Bar barCompare : new Bar[] { bar, negativeBar })
        {
            byte[] jo = JSON_OUTPUT.serialize(barCompare);
            byte[] jbo = JSON_BUFFERED_OUTPUT.serialize(barCompare);
            byte[] jso = JSON_STREAMED_OUTPUT.serialize(barCompare);

            assertTrue(jo.length == jbo.length);
            assertTrue(jso.length == jo.length);

            String joString = STRING.deser(jo);
            String jboString = STRING.deser(jbo);

            assertEquals(joString, jboString);
            assertEquals(joString, STRING.deser(jso));
        }
    }
Compare the outputs of different json impls.

@author David Yu
@created Jul 2, 2010
protostuff-json/src/test/java/io/protostuff/JsonCompareOutputsTest.java