Package com.alibaba.fastjson.parser.deserializer

Examples of com.alibaba.fastjson.parser.deserializer.ExtraProcessor


import com.alibaba.fastjson.parser.deserializer.ExtraTypeProvider;

public class RedundantTest extends TestCase {

    public void test_extra() throws Exception {
        ExtraProcessor processor = new ExtraProcessor() {
            public void processExtra(Object object, String key, Object value) {
                VO vo = (VO) object;
                vo.getAttributes().put(key, value);
            }
        };
View Full Code Here


                    return int.class;
                }
                return null;
            }
        };
        ExtraProcessor processor = new MyExtraProcessor();

        VO vo = JSON.parseObject("{\"id\":123,\"value\":\"123456\"}", VO.class, processor);
        Assert.assertEquals(123, vo.getId());
        Assert.assertEquals(123456, vo.getAttributes().get("value"));
    }
View Full Code Here

TOP

Related Classes of com.alibaba.fastjson.parser.deserializer.ExtraProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.