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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Defaults.PreferNSSecureCoding and Defaults.PreferRawRepresentable #83

Merged
merged 4 commits into from
Oct 12, 2021

Conversation

hank121314
Copy link
Collaborator

@hank121314 hank121314 commented Oct 1, 2021

Summary

Fixes #79.
Add two protocol Defaults.PreferRawRepresentable and Defaults.PreferNSSecureCoding.
These protocols are in order to let user conveniently force their serialization.

Usage

private enum Foo: Int, Defaults.Serializable & Codable & Defaults.PreferRawRepresentable {
	case tenMinutes = 10
	case halfHour = 30
	case oneHour = 60
}

Thanks for your code review 馃槃 !

@sindresorhus sindresorhus changed the title Add PreferBridge protocol for ambiguous serialization. Add Defaults.PreferNSSecureCoding and Defaults.PreferRawRepresentable Oct 12, 2021
@sindresorhus sindresorhus merged commit 5f16cef into sindresorhus:main Oct 12, 2021
@sindresorhus
Copy link
Owner

Looks good. Nice work! 馃憤

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.

Force serialization to not use Codable?
2 participants