Refine JSON implementation for mutability, type safety, and performance - #248
Conversation
AlexNachbaur
commented
Aug 20, 2025
- Previous implementation wasn't mutable, didn't persist its underlying value, and had a clunky developer experience
- Working with WebAuthn, IDX, and JWT generation necessitates JSON mutability
- Relocates JSON and concurrency utility types to separate targets, to streamline maintainability and testing
There was a problem hiding this comment.
Pull Request Overview
This PR significantly refines the JSON implementation to improve mutability, type safety, and performance. The changes introduce a new mutable JSON system with proper copy-on-write semantics, relocate utility types to separate targets, and streamline the overall codebase architecture.
- Introduces a new JSON module with full mutability support and proper copy-on-write patterns
- Moves common utility types (CopyOnWrite, ExpressionUtilities, etc.) to a separate CommonSupport target
- Updates all JSON-related types to use the new JSON implementation instead of the previous immutable approach
Reviewed Changes
Copilot reviewed 107 out of 112 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/JSON/ | Complete new JSON module implementation with mutable values and type safety |
| Sources/CommonSupport/ | New target containing utility types previously in AuthFoundation |
| Tests/JSONTests/ | Comprehensive test suite for the new JSON implementation |
| Various AuthFoundation files | Updated to use new JSON types and CommonSupport utilities |
| Various test files | Updated imports and test code to work with new JSON API |
Files not reviewed (1)
- OktaClient.xcworkspace/contents.xcworkspacedata: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
71c04a4 to
042013a
Compare
d5c2e41 to
e6725d9
Compare
* Previous implementation wasn't mutable, didn't persist its underlying value, and had a clunky developer experience * Working with WebAuthn, IDX, and JWT generation necessitates JSON mutability * Relocates JSON and concurrency utility types to separate targets, to streamline maintainability and testing
e6725d9 to
4a811b4
Compare
0aed5f8 to
ba81f99
Compare
The base branch was changed.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 92 out of 92 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.