Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #296 +/- ##
==========================================
- Coverage 95.57% 93.25% -2.33%
==========================================
Files 25 37 +12
Lines 1762 2919 +1157
==========================================
+ Hits 1684 2722 +1038
- Misses 78 197 +119
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
978abda to
f663c66
Compare
Codable typesDecodable types
6c18cb8 to
f85de5a
Compare
4f60ff2 to
d9d00b7
Compare
Decodable typesCodable types
a25bb94 to
51f8cac
Compare
51f8cac to
2fad330
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Codable protocol support to the JBird JSON library through a new JBirdCodableSupport module. The implementation provides custom JSON encoder and decoder that work with the library's existing JSON type system.
Key Changes
- Introduces
JSON.EncoderandJSON.Decodertypes that conform to Swift's Codable protocols - Implements full encoder/decoder infrastructure including value, object, and array encoding/decoding containers
- Adds
BackingTypeDescriptionenum for better error messages during type mismatches
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/JBirdCodableSupport/EntryPoint.swift | Public API entry points for JSON.Encoder and JSON.Decoder |
| Sources/JBirdCodableSupport/Encoder/*.swift | Internal encoder implementation (ArrayEncoder, ObjectEncoder, ValueEncoder, InternalEncoder) |
| Sources/JBirdCodableSupport/Decoder/*.swift | Internal decoder implementation (ArrayDecoder, ObjectDecoder, ValueDecoder, InternalDecoder) |
| Sources/JBirdCodableSupport/BackingTypeDescription.swift | Helper type for better decoding error messages |
| Sources/JBird/JBird.swift | Updated umbrella module to conditionally export JBirdCodableSupport with CodableSupport trait |
| Tests/JBirdCodableSupportTests/**/*.swift | Comprehensive test coverage for all encoder/decoder functionality |
| Package.swift & Package@swift-6.1.swift | Added JBirdCodableSupport library and CodableSupport trait configuration |
| JBird.xcodeproj/project.pbxproj | Added JBirdCodableSupport framework target with proper dependency linking |
| .github/workflows/ci.yml | Updated CI to include JBirdCodableSupport in build matrix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| init?(intValue: Int) { | ||
| self.init(intValue) | ||
| } |
There was a problem hiding this comment.
The init?(intValue:) initializer is incorrectly calling itself, which would cause infinite recursion. It should call init(_:) instead: self.init(intValue).
| init?(intValue: Int) { | ||
| self.init(intValue) | ||
| } |
There was a problem hiding this comment.
The init?(intValue:) initializer is incorrectly calling itself, which would cause infinite recursion. It should call init(_:) instead: self.init(intValue).
|
|
||
| @Test("Decode Doubles") | ||
| func decodeDoubles() throws { | ||
| // let value: Doubles = [3.14159, -0.1234] |
There was a problem hiding this comment.
Remove commented-out code. If this test data was intentionally changed, the old version should be removed.
| // let value: Doubles = [3.14159, -0.1234] |
0403f95 to
ade410b
Compare
b6e5eb4 to
24df66f
Compare
24df66f to
75db339
Compare
a737743 to
5cb4098
Compare
7c91cbd to
938f24d
Compare
938f24d to
e566895
Compare
987cbb5 to
f23c14d
Compare
1eee835 to
412b160
Compare
bd11454 to
04d8615
Compare
No description provided.