Examples of writerWithDefaultPrettyPrinter()


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

            User user = new User();
            user = user.getUserFromSession(session());

            ObjectMapper mapper = new ObjectMapper();
            String pretty = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(jsonNode);

            return ok(views.html.community.index.render(user, communities, "Top Level Communities", pretty, endpoint));

        } catch (MalformedURLException e) {
            Logger.error(e.getMessage(), e);
View Full Code Here

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

        restResponse.httpResponse = httpResponse;
        restResponse.endpoint = request.getURI().toString();

        ObjectMapper mapper = new ObjectMapper();
        String pretty = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(collection);
        restResponse.jsonString = pretty;

        restResponse.modelObject = collection;

        return restResponse;
View Full Code Here

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

            JsonNode comm = Json.parse(contentString.toString());
            restResponse.endpoint = conn.getURL().toString();

            ObjectMapper mapper = new ObjectMapper();
            String pretty = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(comm);
            restResponse.jsonString = pretty;

            if (comm.size() > 0) {
                Community community = Community.parseCommunityFromJSON(comm);
                restResponse.modelObject = community;
View Full Code Here

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

      jsonView = JsonViews.ExtJS5.class;
    }

    try {
      if (config.isDebug()) {
        configObjectString = mapper.writerWithDefaultPrettyPrinter()
            .withView(jsonView).writeValueAsString(modelObject);
      }
      else {
        configObjectString = mapper.writerWithView(jsonView).writeValueAsString(
            modelObject);
View Full Code Here

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

              ProxyObjectWithApiQuotesMixin.class);
        }
      }

      if (outputConfig.isDebug()) {
        configObjectString = mapper.writerWithDefaultPrettyPrinter()
            .writeValueAsString(modelObject);
      }
      else {
        configObjectString = mapper.writeValueAsString(modelObject);
      }
View Full Code Here

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

    }

    String configObjectString;
    try {
      if (debug) {
        configObjectString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(modelObject);
      } else {
        configObjectString = mapper.writeValueAsString(modelObject);
      }

    } catch (JsonGenerationException e) {
View Full Code Here

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

              ProxyObjectWithApiQuotesMixin.class);
        }
      }

      if (outputConfig.isDebug()) {
        configObjectString = mapper.writerWithDefaultPrettyPrinter()
            .writeValueAsString(modelObject);
      }
      else {
        configObjectString = mapper.writeValueAsString(modelObject);
      }
View Full Code Here

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

    }

    String configObjectString;
    try {
      if (config.isDebug()) {
        configObjectString = mapper.writerWithDefaultPrettyPrinter()
            .writeValueAsString(modelObject);
      }
      else {
        configObjectString = mapper.writeValueAsString(modelObject);
      }
View Full Code Here

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

    public static String json(Object object) {
        try {
      Boolean debug = Boolean.valueOf(AdaptrexRegistry.getConfig().get(AdaptrexConfig.DEBUG));
      ObjectMapper mapper = new ObjectMapper();
            if (debug) {
                ObjectWriter writer = mapper.writerWithDefaultPrettyPrinter();
                return writer.writeValueAsString(object);
            } else {
                return mapper.writeValueAsString(object);
            }
        } catch (Exception e) {
View Full Code Here

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

    }

    String configObjectString;
    try {
      if (config.isDebug()) {
        configObjectString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(modelObject);
      } else {
        configObjectString = mapper.writeValueAsString(modelObject);
      }

    } catch (JsonGenerationException e) {
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.