Examples of JaxbAnnotationModule


Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

    @Override
    protected void doStart() throws Exception {
       
        if (enableJaxbAnnotationModule) {
            // Enables JAXB processing
            JaxbAnnotationModule module = new JaxbAnnotationModule();
            objectMapper.registerModule(module);
        }
       
        if (useList) {
            setCollectionType(ArrayList.class);
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

  /**
   * 支持使用Jaxb的Annotation,使得POJO上的annotation不用与Jackson藕合.
   * 默认会先查找jaxb的annotation,如果找不到再找jackson的.
   */
  public void enableJaxbAnnotation() {
    JaxbAnnotationModule module = new JaxbAnnotationModule();
    mapper.registerModule(module);
  }
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

    }

    @Test @Ignore
    public void test() {
        ObjectMapper mapper = new ObjectMapper();
        JaxbAnnotationModule jaxbModule = new JaxbAnnotationModule();
        jaxbModule.setPriority(Priority.SECONDARY);
        mapper.registerModule(jaxbModule);
        mapper.registerModule(new CSJacksonAnnotationModule());

        StringWriter writer = new StringWriter();
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

        this.objectMapper = new ObjectMapper();
        this.unmarshalType = unmarshalType;
        this.jsonView = jsonView;

        // Enables JAXB processing
        JaxbAnnotationModule module = new JaxbAnnotationModule();
        this.objectMapper.registerModule(module);
    }
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

        this.objectMapper = new ObjectMapper();
        this.unmarshalType = unmarshalType;
        this.jsonView = jsonView;

        // Enables JAXB processing
        JaxbAnnotationModule module = new JaxbAnnotationModule();
        this.objectMapper.registerModule(module);
    }
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

  /**
   * 支持使用Jaxb的Annotation,使得POJO上的annotation不用与Jackson耦合。
   * 默认会先查找jaxb的annotation,如果找不到再找jackson的。
   */
  public void enableJaxbAnnotation() {
    JaxbAnnotationModule module = new JaxbAnnotationModule();
    mapper.registerModule(module);
  }
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

    @Test
    @Ignore
    public void test() {
        ObjectMapper mapper = new ObjectMapper();
        JaxbAnnotationModule jaxbModule = new JaxbAnnotationModule();
        jaxbModule.setPriority(Priority.SECONDARY);
        mapper.registerModule(jaxbModule);
        mapper.registerModule(new CSJacksonAnnotationModule());

        StringWriter writer = new StringWriter();
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

            if (mapper == null) {
                mapper = new ObjectMapper();

                mapper.setVisibilityChecker(new IgnorePropertiesBackedByTransientFields(mapper.getVisibilityChecker()));

                JaxbAnnotationModule module1 = new JaxbAnnotationModule();
                mapper.registerModule(module1);

                BeanValidationAnnotationModule module2 = new BeanValidationAnnotationModule();
                mapper.registerModule(module2);
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

  /**
   * 支持使用Jaxb的Annotation,使得POJO上的annotation不用与Jackson耦合。
   * 默认会先查找jaxb的annotation,如果找不到再找jackson的。
   */
  public JsonMapper enableJaxbAnnotation() {
    JaxbAnnotationModule module = new JaxbAnnotationModule();
    this.registerModule(module);
    return this;
  }
View Full Code Here

Examples of com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule

            if (mapper == null) {
                mapper = new ObjectMapper();

                mapper.setVisibilityChecker(new IgnorePropertiesBackedByTransientFields(mapper.getVisibilityChecker()));

                JaxbAnnotationModule module1 = new JaxbAnnotationModule();
                mapper.registerModule(module1);

                BeanValidationAnnotationModule module2 = new BeanValidationAnnotationModule();
                mapper.registerModule(module2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.