Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.ObjectMapper.addMixInAnnotations()


    String jsonConfig;
    if (!doc) {
      jsonConfig = routerController.getJsonHandler().writeValueAsString(remotingApi, debug);
    } else {
      ObjectMapper mapper = new ObjectMapper();
      mapper.addMixInAnnotations(RemotingApi.class, RemotingApiMixin.class);
      try {
        jsonConfig = mapper.writer().withDefaultPrettyPrinter().writeValueAsString(remotingApi);
      } catch (JsonProcessingException e) {
        jsonConfig = null;
        LogFactory.getLog(ApiController.class).info("serialize object to json", e);
View Full Code Here


      ObjectMapper mapper = new ObjectMapper();
      mapper.configure(JsonGenerator.Feature.QUOTE_FIELD_NAMES, false);

      if (!outputConfig.isSurroundApiWithQuotes()) {
        if (outputConfig.getOutputFormat() == OutputFormat.EXTJS5) {
          mapper.addMixInAnnotations(ProxyObject.class,
              ProxyObjectWithoutApiQuotesExtJs5Mixin.class);
        }
        else {
          mapper.addMixInAnnotations(ProxyObject.class,
              ProxyObjectWithoutApiQuotesMixin.class);
View Full Code Here

        if (outputConfig.getOutputFormat() == OutputFormat.EXTJS5) {
          mapper.addMixInAnnotations(ProxyObject.class,
              ProxyObjectWithoutApiQuotesExtJs5Mixin.class);
        }
        else {
          mapper.addMixInAnnotations(ProxyObject.class,
              ProxyObjectWithoutApiQuotesMixin.class);
        }
        mapper.addMixInAnnotations(ApiObject.class,
            ApiObjectMixin.class);
      }
View Full Code Here

        }
        else {
          mapper.addMixInAnnotations(ProxyObject.class,
              ProxyObjectWithoutApiQuotesMixin.class);
        }
        mapper.addMixInAnnotations(ApiObject.class,
            ApiObjectMixin.class);
      }
      else {
        if (outputConfig.getOutputFormat() != OutputFormat.EXTJS5) {
          mapper.addMixInAnnotations(ProxyObject.class,
View Full Code Here

        mapper.addMixInAnnotations(ApiObject.class,
            ApiObjectMixin.class);
      }
      else {
        if (outputConfig.getOutputFormat() != OutputFormat.EXTJS5) {
          mapper.addMixInAnnotations(ProxyObject.class,
              ProxyObjectWithApiQuotesMixin.class);
        }
      }

      if (outputConfig.isDebug()) {
View Full Code Here

    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(JsonGenerator.Feature.QUOTE_FIELD_NAMES, false);

    if (!config.isSurroundApiWithQuotes()) {
      if (config.getOutputFormat() == OutputFormat.EXTJS5) {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesExtJs5Mixin.class);
      }
      else {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesMixin.class);
View Full Code Here

      if (config.getOutputFormat() == OutputFormat.EXTJS5) {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesExtJs5Mixin.class);
      }
      else {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesMixin.class);
      }
      mapper.addMixInAnnotations(ApiObject.class, ApiObjectMixin.class);
    }
    else {
View Full Code Here

      }
      else {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesMixin.class);
      }
      mapper.addMixInAnnotations(ApiObject.class, ApiObjectMixin.class);
    }
    else {
      if (config.getOutputFormat() != OutputFormat.EXTJS5) {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithApiQuotesMixin.class);
View Full Code Here

      }
      mapper.addMixInAnnotations(ApiObject.class, ApiObjectMixin.class);
    }
    else {
      if (config.getOutputFormat() != OutputFormat.EXTJS5) {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithApiQuotesMixin.class);
      }
    }

    Map<String, Object> modelObject = new LinkedHashMap<String, Object>();
View Full Code Here

    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(JsonGenerator.Feature.QUOTE_FIELD_NAMES, false);

    if (!outputConfig.isSurroundApiWithQuotes()) {
      if (outputConfig.getOutputFormat() == OutputFormat.EXTJS5) {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesExtJs5Mixin.class);
      }
      else {
        mapper.addMixInAnnotations(ProxyObject.class,
            ProxyObjectWithoutApiQuotesMixin.class);
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.