Repository navigation
feat(smithy-json): add configurable eager deserialization - #845
Closed
stobrien89 wants to merge 1 commit into
Closed
stobrien89 wants to merge 1 commit into
stobrien89 wants to merge 1 commit into
Conversation
stobrien89
force-pushed
the
json-eager-deserialization
branch
from
October 10, 2026 17:42
fd193d0 to
5ad00bf
Compare
Add automatic, eager, and streaming JSON deserialization modes and expose the setting through generated JSON client configurations.
stobrien89
force-pushed
the
json-eager-deserialization
branch
from
October 10, 2026 17:54
5ad00bf to
10bdb70
Compare
Contributor
Author
|
Closing in favor of #850 |
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.
Description
Adds configurable eager JSON deserialization for buffered payloads while preserving incremental parsing for streaming readers.
Changes
JSONDeserializationModewithAUTO,EAGER, andSTREAMINGmodes.AUTO, which eagerly parsesbytesand incrementally parsesBytesReaderinputs.json_deserialization_modethrough generated Rest JSON and AWS JSON client configurations.Performance
Benchmarks used Python 3.12.14 on x86_64 with 5,000 warmup iterations and 10,000 measured iterations per case.
Every measured JSON deserialization case improved.
Summary
The combined values below are the sums of the p50 values for each protocol's cases.
Rest JSON 1
restJson1_CopyObjectOutput_BaselinerestJson1_CopyObjectOutput_MrestJson1_GetObject_SrestJson1_GetObject_MrestJson1_GetObject_LAWS JSON 1.0
awsJson1_0_GetItemOutput_BaselineawsJson1_0_GetItemOutput_SawsJson1_0_GetItemOutput_MawsJson1_0_GetItemOutput_LawsJson1_0_GetItemOutputBinary_SawsJson1_0_GetItemOutputBinary_MawsJson1_0_GetItemOutputBinary_LawsJson1_0_HealthcheckResponse_ExampleAWS JSON 1.1
awsJson1_1_GetItemOutput_BaselineawsJson1_1_GetItemOutput_SawsJson1_1_GetItemOutput_MawsJson1_1_GetItemOutput_LawsJson1_1_GetItemOutputBinary_SawsJson1_1_GetItemOutputBinary_MawsJson1_1_GetItemOutputBinary_LawsJson1_1_HealthcheckResponse_ExampleCompatibility
STREAMINGto retain the previous parser for buffered payloads.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.