Skip to content
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

Support vars whose type is Dictionary, e.g. var map: [SomeStruct: Int] #5

Open
entonio opened this issue May 19, 2024 · 1 comment
Open

Comments

@entonio
Copy link

entonio commented May 19, 2024

Currently, if there are members whose type is a dictionary, they will be ignored by the decoder code generator (not by the CodingKeys nor by the encoder), e.g. :

var eatenByFruit: [Fruit: Int]

will have a corrresponding CodingKey, will be present in the encoder body, but skipped by the decoder.

I think this too requires support in SimpleCodableMacro.swift:59-93, but I'm not sure what needs to be done.

@entonio
Copy link
Author

entonio commented May 19, 2024

(As in the previous issue, I ended up copying the generated code and completing it. This macro is a true gift!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant