Package org.apache.logging.log4j.core.jackson

Examples of org.apache.logging.log4j.core.jackson.Log4jJsonObjectMapper


        ThrowableProxy proxy = new ThrowableProxy(new IOException("test"));
    }

    @Test
    public void testJsonIoContainer() throws IOException {
        ObjectMapper objectMapper = new Log4jJsonObjectMapper();
        Fixture expected = new Fixture();
        final String s = objectMapper.writeValueAsString(expected);
        Fixture actual = objectMapper.readValue(s, Fixture.class);
        assertEquals(expected.proxy.getName(), actual.proxy.getName());
        assertEquals(expected.proxy.getMessage(), actual.proxy.getMessage());
        assertEquals(expected.proxy.getLocalizedMessage(), actual.proxy.getLocalizedMessage());
        assertEquals(expected.proxy.getCommonElementCount(), actual.proxy.getCommonElementCount());
        assertArrayEquals(expected.proxy.getExtendedStackTrace(), actual.proxy.getExtendedStackTrace());
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.jackson.Log4jJsonObjectMapper

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.