Package org.codehaus.jackson.mrbean

Examples of org.codehaus.jackson.mrbean.AbstractTypeMaterializer.disable()


    public void testPartialBean() throws Exception
    {
        ObjectMapper mapper = new ObjectMapper();
        AbstractTypeMaterializer mat = new AbstractTypeMaterializer();
        // ensure that we will only get deferred error methods
        mat.disable(AbstractTypeMaterializer.Feature.FAIL_ON_UNMATERIALIZED_METHOD);
        mapper.registerModule(new MrBeanModule(mat));
        PartialBean bean = mapper.readValue("{\"ok\":true}", PartialBean.class);
        assertNotNull(bean);
        assertTrue(bean.isOk());
        // and then exception
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.