You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce StringEncoder and StringDecoder types (#44)
Introduce StringEncoder and StringDecoder types
### Motivation
A sibling PR to #41, as part of moving from hand-crafted code that uses `LosslessStringConvertible` conformances on built-in and generated types, we need not just an URI coder, but also a raw string coder.
This will be used for encoding and decoding `text/plain` bodies, where only primitive types can be used, and are encoded as raw strings.
### Modifications
Introduced two types, `StringEncoder` and `StringDecoder`. It's very simple, doesn't support containers, only primitive types.
### Result
Once this lands, it'll allow us to get rid of our ugly marker protocols `_StringConvertible` and `_AutoLosslessStringConvertible` and always go through `Codable`. More on this in subsequent PRs integrating this logic.
### Test Plan
Added a rountrip unit test.
Reviewed by: glbrntt
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (api breakage) - Build finished.
✔︎ pull request validation (docc test) - Build finished.
✔︎ pull request validation (integration test) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
#44
0 commit comments