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
[Bug] superDecoder(forKey:)
doesn’t work as documented
#314
Comments
Yep, this behaves counter to the documentation. And failing sooner does make sense to me as opposed to deferring it. The forum thread discusses the low likelihood of regression from clients relying on the existing behavior. Normally I'd tend to agree, but during the swift-foundation reimplementation of the entire API surface, I was repeatedly struck by breakages from odd client behavior and expectation. There's a large number of clients of this API, so even a small percentage chance of this happening makes the expected number of real-world regressions probably non-zero. |
Agreed! The important thing is to match the behaviour from macOS 13 and earlier. (rdar://118337978, for reference.) |
And that is indeed what's happening here. Again, I'm not opposed to trying this out, but we may end up being forced to explore compatibility techniques to push the change through for the general population. |
When trying to decode a
Codable
model with following implementation:and empty JSON object(
{}
) error is thrown atinstead of
which is diferrent than documented.
As per discussion in forum, both older and new
Foundation
implementation seems to have this bug.The text was updated successfully, but these errors were encountered: