Package org.codehaus.jackson

Examples of org.codehaus.jackson.Version


import org.springframework.social.foursquare.api.VenueTips;

public class FoursquareModule extends SimpleModule {

  public FoursquareModule() {
    super(FoursquareModule.class.getName(), new Version(1, 0, 0, null));
  }
View Full Code Here


        mapper.getSerializationConfig().setSerializationInclusion(
                JsonSerialize.Inclusion.NON_NULL);
        mapper.configure(
                SerializationConfig.Feature.INDENT_OUTPUT, true);
       
        SimpleModule conversionModule = new SimpleModule("ConversionsModule", new Version(1, 0, 0, null))
            .addSerializer(Money.class, new MoneySerializer())
            .addSerializer(DecimalQuantity.class, new DecimalQuantitySerializer())
            .addSerializer(Percentage.class, new PercentageSerializer())
            .addDeserializer(Percentage.class, new PercentageDeserializer())
            .addSerializer(DateTime.class, new DateTimeSerializer());
View Full Code Here

    }

    protected DataWrapper convertJsonToDataWrapper(String json) {
        ObjectMapper mapper = new ObjectMapper();
        DataDTODeserializer dtoDeserializer = new DataDTODeserializer();
        SimpleModule module = new SimpleModule("DataDTODeserializerModule", new Version(1, 0, 0, null));
        module.addDeserializer(DataDTO.class, dtoDeserializer);
        mapper.registerModule(module);
        if (json == null || "[]".equals(json)){
            return null;
        }
View Full Code Here

     * @throws IOException
     */
    protected DataWrapper convertJsonToDataWrapper(String json) {
        ObjectMapper mapper = new ObjectMapper();
        DataDTODeserializer dtoDeserializer = new DataDTODeserializer();
        SimpleModule module = new SimpleModule("DataDTODeserializerModule", new Version(1, 0, 0, null));
        module.addDeserializer(DataDTO.class, dtoDeserializer);
        mapper.registerModule(module);
        try {
            return mapper.readValue(json, DataWrapper.class);
        } catch (IOException e) {
View Full Code Here

        return "Object ID Module";
    }

    @Override
    public Version version() {
        return new Version(1, 0, 0, null);
    }
View Full Code Here

     * Create our customized object mapper that f.ex. takes care
     * of removing invalid characters from map keys.
     */
    private static ObjectMapper createCustomizedObjectMapper() {
        SimpleModule mapKeyModule =  new SimpleModule("MyMapKeySanitizingSerializerModule"
                , new Version(1, 0, 0, null));
        mapKeyModule.addKeySerializer(String.class, new KeySanitizingSerializer());

        final ObjectMapper customizedMapper = new ObjectMapper();
        customizedMapper.registerModule(mapKeyModule);

View Full Code Here

    public static class MixinModule extends SimpleModule {
        public final Class<?> clazz;
        public final Class<?> mixin;

        public <T, U> MixinModule(String name, Class<T> clazz, Class<U> mixin) {
            super(name, new Version(1, 0, 0, null));
            this.clazz = clazz;
            this.mixin = mixin;

        }
View Full Code Here

    statePool.initialize(getConf());
    
    outMapper = new ObjectMapper();
    // define a module
    SimpleModule module = new SimpleModule("Anonymization Serializer"
                                           new Version(0, 1, 1, "FINAL"));
    // add various serializers to the module
    // use the default (as-is) serializer for default data types
    module.addSerializer(DataType.class, new DefaultRumenSerializer());
    // use a blocking serializer for Strings as they can contain sensitive
    // information
View Full Code Here

    mapper.configure(
        DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS, true);
   
    // define a module
    SimpleModule module = new SimpleModule("State Serializer"
        new Version(0, 1, 1, "FINAL"));
    // add the state deserializer
    module.addDeserializer(StatePair.class, new StateDeserializer());

    // register the module with the object-mapper
    mapper.registerModule(module);
View Full Code Here

    ObjectMapper outMapper = new ObjectMapper();
    outMapper.configure(
        SerializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS, true);
    // define a module
    SimpleModule module = new SimpleModule("State Serializer"
        new Version(0, 1, 1, "FINAL"));
    // add the state serializer
    //module.addSerializer(State.class, new StateSerializer());

    // register the module with the object-mapper
    outMapper.registerModule(module);
View Full Code Here

TOP

Related Classes of org.codehaus.jackson.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.