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

rename JSON.lint(_:) to JSON.lint(whitelisting:) #14

Closed
tayloraswift opened this issue Apr 2, 2022 · 2 comments
Closed

rename JSON.lint(_:) to JSON.lint(whitelisting:) #14

tayloraswift opened this issue Apr 2, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@tayloraswift
Copy link
Owner

the existing API isn’t very clear about whether the passed keys are explicitly allowed to appear, or explicitly prohibited from appearing. we should give it an argument label, like whitelisting:

@tayloraswift tayloraswift added the enhancement New feature or request label Apr 2, 2022
@tayloraswift
Copy link
Owner Author

tayloraswift commented Jul 20, 2022

after some real world use of this API, it's also not always clear if the whitelisted keys are eagerly or lazily removed… current behavior is the client is still able to access these keys from within the body of the closure, which seems at odds with the spelling json.lint(_:)

also unclear is what happens if the whitelist includes keys that are not present in the decoding container. currently the library ignores them.

need to evaluate source breakage, as this API is already in use by a few downstream packages

tayloraswift added a commit that referenced this issue Jul 20, 2022
* divide up large file

* add additional LintingDictionary API per #14 and #27

* forgot to commit JSON.swift
@tayloraswift
Copy link
Owner Author

implemented in #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@tayloraswift and others