feat: Add schema extension support, member JSON name extension - #1136
Merged
Conversation
The clear, count, isEmpty, and allElements members of UniquelyIndexedMutableCollection have no callers in production code and are exercised by tests only, which the SwiftLint analyzer flags as unused declarations. Suppress the rule for that region rather than delete them, so the type remains a complete, symmetric collection.
sichanyoo
approved these changes
Aug 5, 2026
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 of changes
Adds support for schema extensions, which are pieces of data that may be attached to schemas for future reference as a performance enhancement. Also adds a schema extension that allows for reuse of the UTF-8 bytes to be serialized in JSON for a member name.
UniquelyIndexedCollectionto allow for storage of schema extensions with O(1) access time.Schematype for the storage of schema extensions.MemberNameExtension(for AWSJSON 1.0/1.1) andJSONNameExtension(for RestJSON1) that the JSON serializer uses to store UTF-8 bytes for a member's JSON name, so that they may be reused the next time the member is serialized.Also:
Foundation.Datastores small arrays (typically up to 14 bytes) as inline data, avoiding a heap allocation. This should increase performance for encoding of these characters.Performance gains indicate 5-25% performance improvement on JSON serialization, depending on the characteristics of the payload being serialized.
Scope
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.