Add streaming I/O methods to JsonCodec SPI#6246
Open
tsegismont wants to merge 3 commits into
Open
Conversation
Allow JSON decoding from an InputStream and encoding to an OutputStream, so that SQL clients can pass ByteBufInputStream/ByteBufOutputStream directly and avoid intermediate String allocations. Assisted-by: Claude Opus 4.6 Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Member
Author
|
@vietj can you please take a look? It's still a draft because I haven't started the SQL Client updates yet. |
Allow JSON decoding from a Reader and encoding to a Writer, so that SQL clients using non-UTF-8 wire encodings (e.g. MSSQL with UTF-16LE) can avoid intermediate String allocations. Assisted-by: Claude Opus 4.6 Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Extract shared test implementations behind a boolean parameter (useReader/useWriter) so InputStream/OutputStream and Reader/Writer tests share the same assertion logic. Assisted-by: Claude Opus 4.6 Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont
marked this pull request as ready for review
July 16, 2026 15:50
Member
Author
|
This is ready for review. You can see how the new methods are used in tsegismont/vertx-sql-client@8d716e3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow JSON decoding/encoding directly from/to streams and character sources, so that SQL clients can avoid intermediate
Stringorbyte[]allocations.fromInputStream/toOutputStreamfor UTF-8 wire encodings (PG, MySQL)fromReader/toWriterfor non-UTF-8 wire encodings (e.g. MSSQL with UTF-16LE)Some portions of this content were created with the assistance of Claude Opus 4.6