Java 类com.alibaba.fastjson.serializer.ReferenceCodec 实例源码

项目:GitHub    文件:ReferenceDeserializerTest.java   
public void test_0() throws Exception {
    ParserConfig config = new ParserConfig();
    config.putDeserializer(MyRef.class, ReferenceCodec.instance);
    Exception error = null;
    try {
        JSON.parseObject("{\"ref\":{}}", VO.class, config, 0);
    } catch (Exception ex) {
        error = ex;
    }
    Assert.assertNotNull(error);
}