Skip to content

Conversation

rbygrave
Copy link
Contributor

When using JsonOutput, with json content smaller than the avaje-jsonb buffer, this can be written as fixed length content directly from the avaje-jsonb buffer to the http server outputStream without any additional buffering required.

Example using JsonbOutput:

ctx.status(200).contentType("application/json");
var result = HelloDto.fi();
jsonTypeHelloDto.toJson(result, JsonbOutput.of(ctx));

When using JsonOutput, with json content smaller than the avaje-jsonb buffer, this can be written as fixed length content directly from the avaje-jsonb buffer to the http server outputStream without any additional buffering required.
@rbygrave rbygrave requested a review from SentryMan February 19, 2025 11:16
@rbygrave rbygrave self-assigned this Feb 19, 2025
@SentryMan SentryMan merged commit 391b6c4 into master Feb 19, 2025
7 checks passed
@SentryMan SentryMan deleted the feature/add-JsonOutput-option branch February 19, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants