Skip to content

Eliminate String intermediaries in JSON codecs - #1685

Open
tsegismont wants to merge 1 commit into
eclipse-vertx:masterfrom
tsegismont:json-improvements
Open

Eliminate String intermediaries in JSON codecs#1685
tsegismont wants to merge 1 commit into
eclipse-vertx:masterfrom
tsegismont:json-improvements

Conversation

@tsegismont

Copy link
Copy Markdown
Member

Encode and decode JSON directly between ByteBuf and Jackson, avoiding unnecessary charset conversions through String objects.

Note that the PG size estimator now uses a fixed 256-byte estimate for non-String JSON values (JsonObject, JsonArray, etc.) since computing the exact size would require serializing the JSON twice. Resizing shouldn't cost too much with the adaptive ByteBuf allocator.

Encode and decode JSON directly between ByteBuf and Jackson, avoiding unnecessary charset conversions through String objects.

Note that the PG size estimator now uses a fixed 256-byte estimate for non-String JSON values (JsonObject, JsonArray, etc.) since computing the exact size would require serializing the JSON twice.
Resizing shouldn't cost too much with the adaptive ByteBuf allocator.

Assisted-by: Claude Opus 4.6
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont tsegismont added this to the 5.2.0 milestone Jul 31, 2026
@tsegismont
tsegismont requested a review from vietj July 31, 2026 15:29
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.

1 participant