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

Feature - More Swift 3 Updates #3

Closed
wants to merge 11 commits into from
Closed

Conversation

cnoon
Copy link
Member

@cnoon cnoon commented Jul 18, 2016

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.

}
}

return result
Copy link
Member Author

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:).

Copy link
Contributor

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?

…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.
Copy link
Member Author

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.

@cnoon
Copy link
Member Author

cnoon commented Sep 7, 2016

I'm going to just close this PR. Instead we're going to move all these changes and others through in #10.

@cnoon cnoon closed this Sep 7, 2016
@EricAppel EricAppel deleted the feature/more-swift3-updates branch September 7, 2016 20:26
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.

None yet

2 participants