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

Allow *any when using UnmarshalPlist() #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikeschinkel
Copy link

This PR addresses the use-case discussed on the MacAdmins Slack forum with @korylprince and @jessepeterson.

Basically when a struct property is of type *CustomType it was not possible to unmarshal to that type. The fix was suggested by @korylprince which I implemented and tested for my use-case and it appears to work.

I also added a test case name TestValueForDecodeWithDict, and it as well as all other test pass.

@korylprince
Copy link
Contributor

Thanks for the PR @mikeschinkel (and for adding the test case!). I've done some experimentation with this change and confirmed it doesn't change any functionality (other than allowing the new functionality instead of returning an error).

@mikeschinkel
Copy link
Author

@korylprince — Thank you! You are the best! 😊

@jessepeterson
Copy link
Member

@mikeschinkel thanks for the PR! Would you mind revising the test data to be more simplified plist (that's only large enough to display the issue)? For clarity I'd hope to keep it as tiny as possible. Then we can get this merged. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants