-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisit parameter encoding when Swift supports encode to dictionary #3
Comments
@brendanlensink Swift 5.6 includes https://github.com/apple/swift-evolution/blob/main/proposals/0320-codingkeyrepresentable.md I am wondering if that's what we're looking for here? |
This is interesting, but AFAICT would only be available in iOS 15.4 and above. This is a little tricky, since I think it's unlikely any kind of backwards compatible solution will be introduced in the future. I think we've got a feasible couple options right now:
I'm sort of inclined to just go with option 1 for now, but we can probably keep this issue open for future consideration. |
Yeah option 3 sort of includes option 1, and the timing for option 3 is probably some time next year, when iOS 16 reaches 70% adoption rate. That could be a good time to implement |
When encoding GET parameters, we're currently encoding the params to JSON, the decoding to [String: Any]. This is far from ideal but at the time seems like the simplest way.
If Swift does add support for encoding directly to Dictionary we should jump right on that.
The text was updated successfully, but these errors were encountered: