Examples of registerModule()


Examples of com.facebook.presto.jdbc.internal.jackson.databind.ObjectMapper.registerModule()

            }
            modules.add(module);
        }

        for (Module module : modules) {
            objectMapper.registerModule(module);
        }

        return objectMapper;
    }
View Full Code Here

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

*/
public class MaterializedBeanObjectMapperFactory implements FactoryBean<ObjectMapper> {
    @Override
    public ObjectMapper getObject() throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        mapper.registerModule(new MrBeanModule());
        return mapper;
    }

    @Override
    public Class<?> getObjectType() {
View Full Code Here

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

    private static ObjectMapper getMapper() {
        ObjectMapper jacksonMapper = new ObjectMapper();
        AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
        jacksonMapper.setAnnotationIntrospector(primary);
        jacksonMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        jacksonMapper.registerModule(new MrBeanModule());
        return jacksonMapper;
    }
}
View Full Code Here

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

    @Mock private Stream stream;

    @BeforeMethod
    public void setUp() throws Exception {
        final ObjectMapper mapper = new ObjectMapper();
        mapper.registerModule(new JodaModule());

        MockitoAnnotations.initMocks(this);

        when(objectMapper.copy()).thenReturn(mapper);
        when(stream.getId()).thenReturn("stream-id");
View Full Code Here

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

        SimpleModule testModule = new SimpleModule("testModule", new Version(1, 0, 0, null, null, null))
                .addDeserializer( QueryFilter.class, new QueryFilterDeserializer() )
                .addSerializer( LogicalFilter2.class, new LogicalFilter2Serializer() );

        mapper.registerModule(testModule);

        // Verifying that we can pass in a custom Mapper and create a new JsonUtil
        JsonUtil jsonUtil = JsonUtils.customJsonUtil( mapper );

        String testFixture = "/jsonUtils/testdomain/two/queryFilter-realAndLogical2.json";
View Full Code Here

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

        ObjectMapper mapper = new ObjectMapper();

        SimpleModule testModule = new SimpleModule("testModule", new Version(1, 0, 0, null, null, null))
                .addDeserializer( QueryFilter5.class, new QueryFilter5Deserializer() );

        mapper.registerModule(testModule);

        // Verifying that we can pass in a custom Mapper and create a new JsonUtil
        JsonUtil jsonUtil = JsonUtils.customJsonUtil( mapper );

        String testFixture = "/jsonUtils/testdomain/five/queryFilter-realAndLogical5.json";
View Full Code Here

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

        ObjectMapper mapper = new ObjectMapper();

        SimpleModule testModule = new SimpleModule("testModule", new Version(1, 0, 0, null, null, null))
                .addDeserializer( QueryFilter4.class, new QueryFilter4Deserializer() );

        mapper.registerModule(testModule);

        // Verifying that we can pass in a custom Mapper and create a new JsonUtil
        JsonUtil jsonUtil = JsonUtils.customJsonUtil( mapper );

        String testFixture = "/jsonUtils/testdomain/four/queryFilter-realAndLogical4.json";
View Full Code Here

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

        ObjectMapper mapper = new ObjectMapper();

        SimpleModule testModule = new SimpleModule("testModule", new Version(1, 0, 0, null, null, null))
                .addDeserializer( QueryFilter.class, new QueryFilter1Deserializer() );

        mapper.registerModule(testModule);

        // Verifying that we can pass in a custom Mapper and create a new JsonUtil
        JsonUtil jsonUtil = JsonUtils.customJsonUtil( mapper );

        String testFixture = "/jsonUtils/testdomain/one/queryFilter-realAndLogical.json";
View Full Code Here

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

        ObjectMapper mapper = new ObjectMapper();

        SimpleModule testModule = new SimpleModule("testModule", new Version(1, 0, 0, null, null, null))
                .addDeserializer( QueryFilter.class, new QueryFilterDeserializer() );

        mapper.registerModule(testModule);

        // Verifying that we can pass in a custom Mapper and create a new JsonUtil
        JsonUtil jsonUtil = JsonUtils.customJsonUtil( mapper );

        String testFixture = "/jsonUtils/testdomain/two/queryFilter-realAndLogical2.json";
View Full Code Here

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

    @Test @Ignore
    public void test() {
        ObjectMapper mapper = new ObjectMapper();
        JaxbAnnotationModule jaxbModule = new JaxbAnnotationModule();
        jaxbModule.setPriority(Priority.SECONDARY);
        mapper.registerModule(jaxbModule);
        mapper.registerModule(new CSJacksonAnnotationModule());

        StringWriter writer = new StringWriter();

        TestVO vo = new TestVO(1000, "name");
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.