Examples of dumpAsMap()


Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        Calendar cal = Calendar.getInstance();
        cal.setTime(new Date(1000000000000L));
        cal.setTimeZone(TimeZone.getTimeZone("GMT-8:00"));
        bean.setCalendar(cal);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        assertEquals("calendar: 2001-09-08T17:46:40-8:00\nname: lunch\n", output);
        //
        Yaml loader = new Yaml();
        CalendarBean parsed = loader.loadAs(output, CalendarBean.class);
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.