Package com.fasterxml.jackson.databind.introspect.TestNamingStrategyCustom

Examples of com.fasterxml.jackson.databind.introspect.TestNamingStrategyCustom.PersonBean


    }
   
    public void testLowerCaseTranslations() throws Exception
    {
        // First serialize
        String json = mapper.writeValueAsString(new PersonBean("Joe", "Sixpack", 42));
        assertEquals("{\"first_name\":\"Joe\",\"last_name\":\"Sixpack\",\"age\":42}", json);
       
        // then deserialize
        PersonBean result = mapper.readValue(json, PersonBean.class);
        assertEquals("Joe", result.firstName);
        assertEquals("Sixpack", result.lastName);
        assertEquals(42, result.age);
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.introspect.TestNamingStrategyCustom.PersonBean

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.