Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#339 - Support x-json-stream, add JsonGenerator writeNewLine() #345

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions api/src/main/java/jakarta/json/stream/JsonGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down