-
Notifications
You must be signed in to change notification settings - Fork 112
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
Decoding 3rd party Codable data structures #243
Comments
MaxDesiatov
added a commit
that referenced
this issue
Jul 31, 2022
It does. Thanks. |
Great, I've tagged 0.14.0 which includes this change. Thanks for reporting the issue! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was having trouble decoding into
IdentifiedArray
, a data structure from @pointfreeco. It conforms toCodable
. Came up with the following minimal reproduction:I would expect both tests to pass. The vanilla array decoding does pass, but the
IdentifiedArray
decoding throws the following:Had a little trouble understanding
XMLCoder
's internals, but did notice that it extends a few standard library data structures to conform to an internal protocolAnySequence
. If I change my minimal reproduction like so:then both tests pass.
Are my findings correct that conformance to this internal protocol are necessary to decode arbitrary data structures from outside the standard library?
I think ideally this would not be the case, and the encoder/decoder implementations would support arbitrary
Codable
types generally. But I understand the maintainers of the library are not the original authors.In the mean time, if conformance to
AnySequence
is required, what do the maintainers think about making it public?The text was updated successfully, but these errors were encountered: