You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide more control over encoders and decoders used (#21)
# Provide more control over encoders and decoders used
## ♻️ Current situation & Problem
Currently, the `LocalStorage` module automatically uses `JSONEncoder`
and `JSONDecoder` instances that created and managed internally. This
provides no flexibility to a) configure the encoders and decoders used
(e.g., passing custom user data used while decoding) and b) doesn't
allow different storage formats which might be more fitting for some
scenarios.
This PR adds a new optional parameter to both `store` and `load` calls
that allows to pass in encoders or decoders instances from the outside.
It also allows to use different encoders like for example the
`PropertyListEncoder` and `PropertyListDecoder`.
Lastly, this PR makes the package compatible with Swift 6.
## ⚙️ Release Notes
* Control encoders and decoders with the LocalStorage module.
* Swift 6 compatibility.
## 📚 Documentation
New parameters were documented.
## ✅ Testing
--
## 📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
0 commit comments