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

Extend 'Set' to conform to protocol 'JSONConvertible' #242

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

Conversation

rubenbaca
Copy link

Set should also conform to protocol JSONConvertible.

@CLAassistant
Copy link

CLAassistant commented Nov 20, 2017

CLA assistant check
All committers have signed the CLA.

var first = true
for v in self {
if !first {
s.append(",")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you're using this for loop instead of joined(separator:)? https://developer.apple.com/documentation/swift/array/1690077-joined

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Alex, I went with the same (existing) approach used in Array's extension. My pull request was intended to let others know that Set is not conforming to protocol JSONConvertible, as stated in the JIRA issue I created (ISS-556). Feel free to implement it in any other (better) way. Thanks for looking into it!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please adding a test script as well to prove this work. Thank you!

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.

4 participants