Example usage for com.fasterxml.jackson.core.util MinimalPrettyPrinter MinimalPrettyPrinter

List of usage examples for com.fasterxml.jackson.core.util MinimalPrettyPrinter MinimalPrettyPrinter

Introduction

In this page you can find the example usage for com.fasterxml.jackson.core.util MinimalPrettyPrinter MinimalPrettyPrinter.

Prototype

public MinimalPrettyPrinter(String rootValueSeparator) 

Source Link

Usage

From source file:org.eluder.logback.ext.jackson.JsonWriter.java

public JsonWriter(OutputStream os, Charset charset, ObjectMapper mapper) throws IOException {
    generator = mapper.getFactory().createGenerator(new OutputStreamWriter(os, charset))
            .configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false)
            .setPrettyPrinter(new MinimalPrettyPrinter(""));
}

From source file:com.github.shredder121.gh_event_api.handler.AbstractHandlerTest.java

public String minimize(final InputStream stream) throws IOException {
    ObjectMapper mapper = Jackson2ObjectMapperBuilder.json().build();
    Map<String, Object> content = mapper.reader().forType(Map.class).readValue(stream);
    return mapper.writer(new MinimalPrettyPrinter(null/*minimizes*/)).writeValueAsString(content);
}