Search in sources :

Example 1 with DefaultIndenter

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter in project spring-framework by spring-projects.

the class Jackson2JsonEncoder method initSsePrettyPrinter.

private static PrettyPrinter initSsePrettyPrinter() {
    DefaultPrettyPrinter printer = new DefaultPrettyPrinter();
    printer.indentObjectsWith(new DefaultIndenter("  ", "\ndata:"));
    return printer;
}
Also used : DefaultPrettyPrinter(com.fasterxml.jackson.core.util.DefaultPrettyPrinter) DefaultIndenter(com.fasterxml.jackson.core.util.DefaultIndenter)

Example 2 with DefaultIndenter

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter in project flink by apache.

the class RestAPIStabilityTest method writeSnapshot.

private static void writeSnapshot(final String versionedSnapshotFileName, final RestAPISnapshot snapshot) throws IOException {
    OBJECT_MAPPER.writer(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter().withLinefeed("\n"))).writeValue(new File("src/test/resources/" + versionedSnapshotFileName), snapshot);
    System.out.println("REST API snapshot " + versionedSnapshotFileName + " was updated, please remember to commit the snapshot.");
}
Also used : DefaultPrettyPrinter(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultPrettyPrinter) DefaultIndenter(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter) File(java.io.File)

Example 3 with DefaultIndenter

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter in project rest.li by linkedin.

the class IndentedPdlBuilder method getPrettyPrinter.

private PrettyPrinter getPrettyPrinter() {
    DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
    prettyPrinter.indentObjectsWith(new DefaultIndenter(getIndentSpaces(1), DefaultIndenter.SYS_LF + getIndentSpaces(_indentDepth)));
    return prettyPrinter;
}
Also used : DefaultPrettyPrinter(com.fasterxml.jackson.core.util.DefaultPrettyPrinter) DefaultIndenter(com.fasterxml.jackson.core.util.DefaultIndenter)

Example 4 with DefaultIndenter

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter in project spring-framework by spring-projects.

the class AbstractJackson2HttpMessageConverter method init.

protected void init(ObjectMapper objectMapper) {
    this.objectMapper = objectMapper;
    setDefaultCharset(DEFAULT_CHARSET);
    DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
    prettyPrinter.indentObjectsWith(new DefaultIndenter("  ", "\ndata:"));
    this.ssePrettyPrinter = prettyPrinter;
}
Also used : DefaultPrettyPrinter(com.fasterxml.jackson.core.util.DefaultPrettyPrinter) DefaultIndenter(com.fasterxml.jackson.core.util.DefaultIndenter)

Example 5 with DefaultIndenter

use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter in project qpp-conversion-tool by CMSgov.

the class JsonWrapper method getPrinter.

private static DefaultPrettyPrinter getPrinter() {
    DefaultIndenter withLinefeed = new DefaultIndenter("  ", "\n");
    DefaultPrettyPrinter printer = new DefaultPrettyPrinter();
    printer.indentObjectsWith(withLinefeed);
    return printer;
}
Also used : DefaultPrettyPrinter(com.fasterxml.jackson.core.util.DefaultPrettyPrinter) DefaultIndenter(com.fasterxml.jackson.core.util.DefaultIndenter)

Aggregations

DefaultIndenter (com.fasterxml.jackson.core.util.DefaultIndenter)4 DefaultPrettyPrinter (com.fasterxml.jackson.core.util.DefaultPrettyPrinter)4 File (java.io.File)1 DefaultIndenter (org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultIndenter)1 DefaultPrettyPrinter (org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.util.DefaultPrettyPrinter)1