Package org.codehaus.jackson.xc

Examples of org.codehaus.jackson.xc.JaxbAnnotationIntrospector


    }


    private static Pair createJaxbJacksonAnnotationIntrospector() {

        AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector();
        AnnotationIntrospector jacksonIntrospector = new JacksonAnnotationIntrospector();

        return new AnnotationIntrospector.Pair(jacksonIntrospector, jaxbIntrospector);
    }
View Full Code Here


        return result;
    }

    private static Pair createJaxbJacksonAnnotationIntrospector() {

        AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector();
        AnnotationIntrospector jacksonIntrospector = new JacksonAnnotationIntrospector();

        return new AnnotationIntrospector.Pair(jacksonIntrospector, jaxbIntrospector);
    }
View Full Code Here

  }

  public ObjectMapper getMapper() {
    if (JACKSON_MAPPER == null) {
      AnnotationIntrospector jackson = new JacksonAnnotationIntrospector();
      AnnotationIntrospector jaxb = new JaxbAnnotationIntrospector();
      AnnotationIntrospector pair = new AnnotationIntrospector.Pair(jaxb,
          jackson);
      ObjectMapper mapper = new ObjectMapper();
      mapper.getSerializationConfig().setAnnotationIntrospector(jaxb);
      mapper.getDeserializationConfig().setAnnotationIntrospector(pair);
View Full Code Here

      org.codehaus.jackson.map.SerializationConfig.Feature.WRAP_ROOT_VALUE,
      false);
  mapper.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
  _mapperConfig.setMapper(mapper);
  _mapperConfig.getConfiguredMapper().setAnnotationIntrospector(
      new JaxbAnnotationIntrospector());
 
  }
View Full Code Here

  }

  @Override
  public ObjectMapper locateMapper(Class<?> type, MediaType mediaType) {
    ObjectMapper mapper = super.locateMapper(type, mediaType);
    AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
    mapper.setAnnotationIntrospector(introspector);
    mapper.getSerializationConfig()
        .setSerializationInclusion(Inclusion.NON_NULL);
    return mapper;
  }
View Full Code Here

            mapper = new ObjectMapper();
            mapper.registerModule(new JsonOrgModule());
        }
        // Let's honor the Jackson annotations first
        AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
        AnnotationIntrospector secondary = new JaxbAnnotationIntrospector();
        AnnotationIntrospector pair = new AnnotationIntrospector.Pair(primary, secondary);
        mapper.setDeserializationConfig(mapper.getDeserializationConfig().withAnnotationIntrospector(pair)
            .without(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES)
            .withDateFormat(StdDateFormat.getBlueprintISO8601Format()));
        mapper.setSerializationConfig(mapper.getSerializationConfig().withAnnotationIntrospector(pair)
View Full Code Here

TOP

Related Classes of org.codehaus.jackson.xc.JaxbAnnotationIntrospector

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.