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

JSON decoder not properly decoding defaultConfigurationIsVisible in some projects #592

Closed
tjwio opened this issue Nov 22, 2020 · 0 comments · Fixed by #593
Closed

JSON decoder not properly decoding defaultConfigurationIsVisible in some projects #592

tjwio opened this issue Nov 22, 2020 · 0 comments · Fixed by #593

Comments

@tjwio
Copy link
Contributor

tjwio commented Nov 22, 2020

Context 🕵️‍♀️

Some of our projects generated via BUCK have a plist encoding so the property looks like:

<key>defaultConfigurationIsVisible</key>
<false/>

instead of something like:

defaultConfigurationIsVisible = 0;

This causes the JSON encoder to encode the property as a boolean instead of a string, so the JSON decoder fails to decode that boolean properly since it thinks it's a string

What 🌱

This error is thrown when trying to decode defaultConfigurationIsVisible

error: typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "defaultConfigurationIsVisible", intValue: nil)], debugDescription: "Expected to decode String but found a number instead.", underlyingError: nil))

Proposal 🎉

#593

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