From da8ae6f7eeba5228305a2bac73a6b43c658b80c0 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Wed, 15 Dec 2021 10:22:35 +1300 Subject: [PATCH] #339 - Support x-json-stream, add JsonGenerator writeNewLine() --- .../main/java/jakarta/json/stream/JsonGenerator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/src/main/java/jakarta/json/stream/JsonGenerator.java b/api/src/main/java/jakarta/json/stream/JsonGenerator.java index 3fbc4b7a..fca3d490 100644 --- a/api/src/main/java/jakarta/json/stream/JsonGenerator.java +++ b/api/src/main/java/jakarta/json/stream/JsonGenerator.java @@ -514,6 +514,16 @@ public interface JsonGenerator extends Flushable, /*Auto*/Closeable { */ JsonGenerator writeNull(); + /** + * Writes the new line character to the underlying content. + * This enables a generator to support {@code x-json-stream} new line delimited content. + * + * @return this generator + * @throws jakarta.json.JsonException if an i/o error occurs (IOException + * would be cause of JsonException) + */ + JsonGenerator writeNewLine(); + /** * Closes this generator and frees any resources associated with it. * This method closes the underlying output source.