Package com.fasterxml.jackson.datatype.guava

Examples of com.fasterxml.jackson.datatype.guava.GuavaModule


    }

    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

    private ApiClientImpl(ServerNodes serverNodes, @Named("Default Timeout") Long defaultTimeout) {
        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

    ObjectMapper objectMapper;

    @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

    }

    private void registerJacksonSupport() {
        ObjectMapper mapper = new ObjectMapper();
        mapper.enable(SerializationFeature.INDENT_OUTPUT);
        mapper.registerModule(new GuavaModule());

        // create JsonProvider to provide custom ObjectMapper
        JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();
        provider.setMapper(mapper);
View Full Code Here

  public DefaultObjectMapper(JsonFactory factory)
  {
    super(factory);
    registerModule(new DruidDefaultSerializersModule());
    registerModule(new GuavaModule());
    registerModule(new QueryGranularityModule());
    registerModule(new AggregatorsModule());
    registerModule(new SegmentsModule());

    configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
View Full Code Here

    }

    private void registerJacksonSupport() {
        ObjectMapper mapper = new ObjectMapper();
        mapper.enable(SerializationFeature.INDENT_OUTPUT);
        mapper.registerModule(new GuavaModule());

        // create JsonProvider to provide custom ObjectMapper
        JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();
        provider.setMapper(mapper);
View Full Code Here

        addMixInAnnotations(StudyManagement.Annotations.class, AnnotationsMixin.class);
        addMixInAnnotations(StudyManagement.MetaFactor.class, MetaFactorMixin.class);
        addMixInAnnotations(InstrumentManagement.InstrumentDetails.class, InstrumentDetailsMixin.class);
        addMixInAnnotations(InstrumentManagement.UploadFileItem.class, UploadFileItemMixin.class);
        addMixInAnnotations(ExperimentCreationHelper.ExperimentAttachment.class, ExperimentAttachmentMixin.class);
        registerModule(new GuavaModule());
    }
View Full Code Here

    }

    protected void registerJacksonSupport() {
        ObjectMapper mapper = new ObjectMapper();
        mapper.enable(SerializationFeature.INDENT_OUTPUT);
        mapper.registerModule(new GuavaModule());

        // create JsonProvider to provide custom ObjectMapper
        JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();
        provider.setMapper(mapper);
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.datatype.guava.GuavaModule

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.