List of usage examples for com.fasterxml.jackson.core.util MinimalPrettyPrinter MinimalPrettyPrinter
public MinimalPrettyPrinter(String rootValueSeparator)
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); }