Package com.fasterxml.jackson.core

Examples of com.fasterxml.jackson.core.Version


public class ReflectiveJsonRecordSerialiser extends JsonSerializer<Record> {

    public static ObjectMapper mapperWith(JsonSerializer<?>...extraSerialisers) {
        ObjectMapper mapper = new ObjectMapper();
        SimpleModule simpleModule = new SimpleModule("SimpleModule",
                new Version(1,0,0,null));
        simpleModule.addSerializer(new ReflectiveJsonRecordSerialiser());
        Stream.of(extraSerialisers).forEach(simpleModule::addSerializer);

        mapper.registerModules(simpleModule);
View Full Code Here


        objectMapper.disable(MapperFeature.AUTO_DETECT_IS_GETTERS);
        objectMapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
        objectMapper.disable(MapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS);

        if (jsonSerializers != null || jsonDeserializers != null || keySerializers != null || keyDeserializers != null) {
            SimpleModule module = new SimpleModule(getClass().getName(), new Version(1, 0, 0, null));
            if (jsonSerializers != null) {
                for (Entry<Class<?>, JsonSerializer<?>> entry : jsonSerializers.entrySet()) {
                    addSerializer(module, entry.getKey(), entry.getValue());
                }
            }
View Full Code Here

* @author miemiedev
*/
public class PageListJsonMapper extends ObjectMapper{

    public PageListJsonMapper() {
        SimpleModule module = new SimpleModule("PageListJSONModule", new Version(1, 0, 0, null, null, null));
        module.addSerializer(PageList.class, new PageListJsonSerializer(this));
        registerModule(module);
    }
View Full Code Here

import com.fasterxml.jackson.databind.module.SimpleModule;

public class I18NModule extends SimpleModule {

    public I18NModule() {
        super("I18NModule", new Version(1, 0, 0, null));
        addDeserializer(Localized.class, new LocalizedDeserializer());
        addSerializer(Localized.class, new LocalizedSerializer());
    }
View Full Code Here

import java.time.LocalDateTime;

public class JSR310Module extends SimpleModule {

    public JSR310Module() {
        super("JSR310Module", new Version(1, 0, 0, null));
        addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer());
        addSerializer(LocalDateTime.class, new LocalDateTimeSerializer());
    }
View Full Code Here

                + r.getStatusCode());
        } else {
            try {
                NodeStats.UndefinedStatDeserializer usd = new NodeStats.UndefinedStatDeserializer();
                SimpleModule module = new SimpleModule("UndefinedStatDeserializer",
                                                       new Version(1,0,0,null,null,null));
                module.addDeserializer(BigInteger.class, usd);
                return new ObjectMapper().registerModule(module).readValue(r.getBodyAsString(), NodeStats.class);
            } catch (IOException e) {
                throw new IOException("Could not parse stats JSON response, body: " + r.getBodyAsString(),e);
            }
View Full Code Here

        objectMapper.disable(MapperFeature.AUTO_DETECT_IS_GETTERS);
        objectMapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
        objectMapper.disable(MapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS);

        if (jsonSerializers != null || jsonDeserializers != null || keySerializers != null || keyDeserializers != null) {
            SimpleModule module = new SimpleModule(getClass().getName(), new Version(1, 0, 0, null));
            if (jsonSerializers != null) {
                for (Entry<Class<?>, JsonSerializer<?>> entry : jsonSerializers.entrySet()) {
                    addSerializer(module, entry.getKey(), entry.getValue());
                }
            }
View Full Code Here

* @author Paul Bors (Paul@Bors.ws)
*
*/
public class ContinuousCalendarJacksonModule extends SimpleModule {
    public ContinuousCalendarJacksonModule() {
        super("wicket-continuous-calendar", new Version(
            1, 0, 0, null, "com.googlecode.wicket-continuous-calendar", "wicket-continuous-calendar")
        );
    }
View Full Code Here

                        return "test-module";
                    }

                    @Override
                    public Version version() {
                        return new Version(2, 0, 0, "", "org.jongo", "testmodule");
                    }

                    @Override
                    public void setupModule(SetupContext setupContext) {
                        SimpleDeserializers deserializers = new SimpleDeserializers();
View Full Code Here

    }

   
    @Override
    public Version version() {
        return new Version(1, 1, 0, "", "cxf", "json-schema-mbean");
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.core.Version

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.