Package com.fasterxml.jackson.datatype.joda

Examples of com.fasterxml.jackson.datatype.joda.JodaModule


    }

    private ObjectMapper buildObjectMapper() {
        return new ObjectMapper()
                .registerModules(new GuavaModule(), new JodaModule())
                .setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)
                .enable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
                .disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES)
                .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }
View Full Code Here


    public ObjectMapperProvider() {
        objectMapper = new ObjectMapper()
                .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
                .setPropertyNamingStrategy(new PreserveLeadingUnderscoreStrategy())
                .registerModule(new JodaModule())
                .registerModule(new GuavaModule())
                .registerModule(new SimpleModule().addSerializer(new RangeJsonSerializer()));
    }
View Full Code Here

    public ApiRequest() {
        this(new ObjectMapper()
                .setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)
                .setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)
                .registerModule(new GuavaModule())
                .registerModule(new JodaModule()));
    }
View Full Code Here

    @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

        this(serverNodes, defaultTimeout,
                new ObjectMapper()
                        .setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)
                        .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
                        .registerModule(new GuavaModule())
                        .registerModule(new JodaModule()));
    }
View Full Code Here

    @PostConstruct
    public void init() {
        //TODO auto config configurer ala boot
        objectMapper.registerModule(new GuavaModule());
        objectMapper.registerModule(new GuavaExtrasModule());
        objectMapper.registerModule(new JodaModule());
        objectMapper.registerModule(new JSR310Module());
        objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
    }
View Full Code Here

        if (mapper == null) {
            mapper = new ObjectMapper();
            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
            mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
            mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
            mapper.registerModule(new JodaModule());
        }
        return mapper;
    }
View Full Code Here

    private CouchDatabase couchDatabase;

    public TestSetup() {

        // REVIEW - Now using SSL Setup
        JacksonCouchJsonStrategy jsonStrategy = new JacksonCouchJsonStrategy(new JodaModule());
        couchSetup = new CouchSetup(couchUrl)
            .setUserName(userName)
            .setPassword(password)
            .setHttpClient(JerseyCouchHttpClient.class)
            .setJsonStrategy(jsonStrategy);
View Full Code Here

        SimpleCouchInjectables injectables = new SimpleCouchInjectables();
        injectables.addValue(eventBus);
        injectables.addValue("logger", logger);

        // Create the strategy.
        JacksonCouchJsonStrategy jsonStrategy = new JacksonCouchJsonStrategy(new JodaModule());
        jsonStrategy.setCouchInjectables(injectables);
        CouchSetup couchSetup = new CouchSetup(couchUrl)
                .setUserName(TestSetup.userName)
                .setPassword(TestSetup.password)
                .setHttpClient(JerseyCouchHttpClient.class)
View Full Code Here

        module.addDeserializer(Money.class, new MoneyDeserializer());
        module.addDeserializer(CurrencyUnit.class, new CurrencyUnitDeserializer());
        module.addSerializer(CurrencyUnit.class, new CurrencyUnitSerializer());
        result.registerModule(module);

        result.registerModule(new JodaModule());

        return result;
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.datatype.joda.JodaModule

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.