hello. I guess the source I attached above has nothing to do with it.
if (prettyPrint) { generator.useDefaultPrettyPrinter(); } else if (OutputGrouping.OUTPUT_ONELINE.equals(outputGrouping)) { // Use a minimal pretty printer with a newline object separator, will output one JSON object per line generator.setPrettyPrinter(new MinimalPrettyPrinter("\n")); } Perhaps the behavior is different here. Have a nice day.