Examples of addMixInAnnotations()


Examples of com.fasterxml.jackson.databind.ObjectMapper.addMixInAnnotations()

    public void testIntervalSerWithTypeInfo() throws IOException
    {
        Interval interval = new Interval(1396439982, 1396440001);

        ObjectMapper mapper = jodaMapper();
        mapper.addMixInAnnotations(Interval.class, ObjectConfiguration.class);
        assertEquals("[\"org.joda.time.Interval\"," + quote("1396439982-1396440001") + "]",
                mapper.writeValueAsString(interval));
    }
   
    /*
 
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.