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
Feature - More Swift 3 Updates #3
Conversation
} | ||
} | ||
|
||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty big win here. We're able to eliminate one of the parseProperties
APIs by combining them into one thus removing the possibility of ambiguity and allowing us to use parseProperties(from:)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were intentionally separate APIs in the past to add clarity and strong typing for the Data
option being available. The design guidelines state that weak type information should be compensated for with a noun to describe its role. In this case we may consider splitting these back up into parseProperties(fromJSON: ...
and parseProperties(fromData: ...
. Thoughts?
082afb0
to
66bc659
Compare
…Serialization API
f996d33
to
a40e78b
Compare
d905f93
to
63d1b5b
Compare
…alue(_ value: Any, ofType type: ParserPropertyType)`
- parameter data: An NSData object containing encoded json data. | ||
- parameter forKeyPath: The json key path identifying the object to be parsed. Default is `""`. | ||
- parameter atKeyPath: The json key path identifying the object to be parsed. Default is `""`. | ||
- parameter from: A Data object containing encoded json data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be keyPath
and data
in the docs.
I'm going to just close this PR. Instead we're going to move all these changes and others through in #10. |
This PR refactors some of the APIs to be more Swift 3 friendly. More details are broken out in the commit log. Let's chat through these changes in person to decide if we think these are all the best Swift 3 stylistic decisions.