Add Codable support
TODO
- [x] Add
Decodablesupport - [x] Add an equivalent to
unwrappedthat's added byPartialConvertiblewhenWrappedisPartialCodable - [ ] Support embedded partials, builders
- [ ] Find a more appropriate name for
PartialCodable
Codecov Report
Merging #175 (79f8225) into master (8395463) will increase coverage by
1.94%. The diff coverage is95.65%.
@@ Coverage Diff @@
## master #175 +/- ##
==========================================
+ Coverage 92.81% 94.75% +1.94%
==========================================
Files 6 8 +2
Lines 153 381 +228
==========================================
+ Hits 142 361 +219
- Misses 11 20 +9
| Impacted Files | Coverage Δ | |
|---|---|---|
| Sources/Partial/Partial.swift | 82.35% <72.72%> (-10.51%) |
:arrow_down: |
| Sources/Partial/PartialBuilder.swift | 91.75% <75.00%> (-1.51%) |
:arrow_down: |
| ...s/Partial/Codable/KeyPathCodingKeyCollection.swift | 87.50% <87.50%> (ø) |
|
| ...al/Codable/KeyPathCodingKeyCollectionBuilder.swift | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 8395463...79f8225. Read the comment docs.
That would be a really great feature!
Imagine I have a profile and a complete profile with details. Profile: id name
Full profile: id name email company
With this PR merged, I could merge models and parse them from JSON.
That would be a really great feature!
Imagine I have a profile and a complete profile with details.
Profile:
id
name
Full profile:
id
name
company
With this PR merged, I could merge models and parse them from JSON.
This is certainly a good use case, I do plan to work on this when I have more spare time. I don't personally need this feature so it's not a top priority for me currently!