cherrywoods/swift-meta-serialization
Serialize any Codable Swift type with one extra line of code
Installation
Install MetaSerialization using one of these dependency managers: - Swift Package Manager - Carthage - CocoaPods (latest version 2.3 not available, only 2.1).
Documentation
Please refer to the docstrings embedded in the source code for API docs. Help for installing MetaSerialization and getting started using the framework is available here: https://github.com/cherrywoods/swift-meta-serialization/tree/master/docs/Guides. These documents will probably leave you with some unanswered questions. Please ask them on the discussions page: https://github.com/cherrywoods/swift-meta-serialization/discussions
- Not sure whether MetaSerialization can help you? Ask! https://github.com/cherrywoods/swift-meta-serialization/discussions/categories/can-i-use-this-for
- The docs are vague/unclear/do not cover something? https://github.com/cherrywoods/swift-meta-serialization/discussions/categories/q-a
- I would love to see your usecases if you want to share: https://github.com/cherrywoods/swift-meta-serialization/discussions/categories/show-and-tell
Issues and pull requests are also very welcome! Just make sure you stick to the Code of Conduct.
Limitations
MetaSerialization can only do it's work properly, if you do not use the function encode(to: ) of the Encodable protocol directly in your implementation of it. Use the encode methods of the (Un)Keyed/SingleValueEncodingContainers instead.
Maintainance Status
I am maintaining this project as a hobby aside my full-time job. I will answer to questions/issues/pull requests within one or two days, but resolving issues may take more time.
Versions
Swift version
| Swift Version | MetaSerialization Version | | ------------- | --------------------------| | 5.2 | 2.3 | | 5.1 | 2.2 | | 4.2 | 2.1.0 | | 4.1.2 | 2.0.1 | | 4.1 | 2.0 | | 4.0 | 1.0 |
2.3
Version 2.3 adds an optional feature to maintain the insertion order in keyed containers, fixes the tests, and updates the documentation.
2.0
Version 2 added a bunch of features, separated encoding and decoding where necessary and provided better overriding options for Meta(De|En)coder. However, this resulted in a more closed environment, where not everything is overridable, as it as in version 1.
1.0
Version 1 was very similar to Foundations JSONEncoder implementation. Almost everything way declared open.
Licensing
This framework is licensed at the Apache Version 2.0 License, (nearly) the same license swift is licensed at.
Contributors
Many thanks to everyone who contributed to this project!
- @ilg - Isaac Greenspan
Main contributor and maintainer:
- @cherrywoods - David Boetius (me)
Package Metadata
Repository: cherrywoods/swift-meta-serialization
Stars: 20
Forks: 2
Open issues: 1
Default branch: main
Primary language: swift
License: Apache-2.0
Topics: serialization, swift
README: README.md