Package org.codehaus.jackson

Examples of org.codehaus.jackson.Version


    mapper.configure(
        SerializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS, true);

    // define a module
    SimpleModule module = new SimpleModule("Default Serializer"
                                           new Version(0, 1, 1, "FINAL"));
    // add various serializers to the module
    //   add default (all-pass) serializer for all rumen specific data types
    module.addSerializer(DataType.class, new DefaultRumenSerializer());
    //   add a serializer to use object.toString() while serializing
    module.addSerializer(ID.class, new ObjectStringSerializer<ID>());
View Full Code Here


import org.codehaus.jackson.map.module.SimpleModule;

public class IMetricSerializer {
    public ObjectMapper getObjectMapper() {
        ObjectMapper mapper = new ObjectMapper();
        SimpleModule metricModule = new SimpleModule("IMetricSerializerModule", new Version(1, 0, 0, null));

        metricModule.setMixInAnnotation(IMetric.class, IMetricMixin.class);
        metricModule.setMixInAnnotation(Locator.class, LocatorMixin.class);
        metricModule.setMixInAnnotation(PreaggregatedMetric.class, PreaggMetricMixin.class);
        metricModule.setMixInAnnotation(Rollup.class, RollupMixin.class);
View Full Code Here

  public static final String EXP = "E";
  public static final String AT = "@";

  public static Module build() {

    Version version = new Version(1, 0, 0, null);

    SimpleModule module = new SimpleModule("values", version);

    //
View Full Code Here

import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.module.SimpleModule;

public class PointyObjectMapper extends ObjectMapper{
    public PointyObjectMapper() {
        SimpleModule module = new SimpleModule("JSONModule", new Version(2, 0, 0, null));
        module.addSerializer(Date.class, new DateSerializer());
        module.addDeserializer(Date.class, new DateDeserializer());
        //...
        this.registerModule(module);
    }
View Full Code Here

  public static final String EXP = "E";
  public static final String AT = "@";

  public static Module build() {

    Version version = new Version(1, 0, 0, null);

    SimpleModule module = new SimpleModule("values", version);

    //
View Full Code Here

  }

  private class CustomModule extends SimpleModule {

    public CustomModule(ObjectMapper mapper) {
      super("CustomModule", new Version(0, 1, 1, "duh"));

      // objectos comuns base
      addSerializer(Cep.class, new CepSerializer());
      addSerializer(Cnpj.class, new CnpjSerializer());
      addSerializer(Context.class, new ContextSerializer(mapper));
View Full Code Here

/**
* @author Kohsuke Kawaguchi
*/
public class CloudResourceJacksonModule extends SimpleModule {
    public CloudResourceJacksonModule() {
        super(CloudResourceJacksonModule.class.getName(), new Version(1,0,0,null));
        addSerializer(new CloudResourceSerializer());
    }
View Full Code Here

      _deserializers = new STJSDeserializers();
    }
  }

  public static Module getModule() {
    SimpleModule module = new STJSSimpleModule("MyModule", new Version(1, 0, 0, null));
    module.addSerializer(new JSArraySerializer());
    module.addSerializer(new JSMapSerializer());
    module.addSerializer(new JSDateSerializer());
    module.addDeserializer(Date.class, new JSDateDeserializer());
    return module;
View Full Code Here

import org.springframework.social.movies.netflix.api.NetFlixUserProfile;

public class NetFlixModule extends SimpleModule {

  public NetFlixModule() {
    super("NetFlixModule", new Version(1, 0, 0, null));
  }
View Full Code Here

  public CustomObjectMapper() {
    super.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);
    setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
    configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
    SimpleModule simpleModule = new SimpleModule("SimpleModule",
        new Version(1, 0, 0, null));

    simpleModule.addSerializer(new ContactSerializer());
    simpleModule.addSerializer(new StructuredValueSerializer());
    simpleModule.addSerializer(new TextListSerializer());
    simpleModule.addSerializer(new TextSerializer());
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.