public void testFooNullFieldsButLast() throws Exception
    {
        Foo b = new Foo();
        JsonIOUtil.mergeFrom(JsonIOUtil.DEFAULT_JSON_FACTORY.createJsonParser(
                "{\"someInt\":[null,1]" +
                        ",\"someString\":[null,\"string\"]" +
                        ",\"someBar\":[null,{}]" +
                        ",\"someEnum\":[null,1]" +
                        ",\"someBytes\":[null,\"fw==\"]" + // 0x7f
                        ",\"someBoolean\":[null,true]" +
                        ",\"someFloat\":[null,10.01]" +
                        ",\"someDouble\":[null,100.001]" +
                        ",\"someLong\":[null,1000]}"),
                b, b.cachedSchema(), false);

        assertEquals(b.getSomeInt(), Arrays.asList(new Integer(1)));
        assertEquals(b.getSomeString(), Arrays.asList("string"));
        assertEquals(b.getSomeBar(), Arrays.asList(new Bar()));
        assertEquals(b.getSomeEnum(), Arrays.asList(Foo.EnumSample.TYPE1));
        assertEquals(b.getSomeBytes(), Arrays.asList(ByteString.copyFrom(new byte[] { 0x7f })));
        assertEquals(b.getSomeBoolean(), Arrays.asList(Boolean.TRUE));
        assertEquals(b.getSomeFloat(), Arrays.asList(new Float(10.01f)));
        assertEquals(b.getSomeDouble(), Arrays.asList(new Double(100.001d)));
        assertEquals(b.getSomeLong(), Arrays.asList(new Long(1000l)));
    }
Testing for json ser/deser against messages.

@author David Yu
@created Nov 20, 2009
protostuff-json/src/test/java/io/protostuff/JsonCoreSerDeserTest.java