public static JsonGenerator createGenerator(Writer writer) throws IOException {
    JsonGenerator generator = JSON_FACTORY.createGenerator(writer);
    DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
    prettyPrinter.indentArraysWith(TWOSPACES_LF_INDENTER);
    prettyPrinter.indentObjectsWith(TWOSPACES_LF_INDENTER);
    generator.setPrettyPrinter(prettyPrinter);
    return generator;
  }
Creates a new {@link JsonGenerator} with pretty-printing enabled forcing {@code '\n'}
between lines, as opposed to Jackson's default which uses the system line separator.
zipkin-server/src/main/java/zipkin2/server/internal/JsonUtil.java