https://github.com/scottgriv/swift-json_codables
Demo of decoding JSON using Swift's Codable API.
https://github.com/scottgriv/swift-json_codables
json swift swift-codable swift-codable-files
Last synced: 5 months ago
JSON representation
Demo of decoding JSON using Swift's Codable API.
- Host: GitHub
- URL: https://github.com/scottgriv/swift-json_codables
- Owner: scottgriv
- License: unlicense
- Created: 2023-01-05T02:51:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-09T04:28:06.000Z (about 1 year ago)
- Last Synced: 2025-07-30T17:28:23.351Z (5 months ago)
- Topics: json, swift, swift-codable, swift-codable-files
- Language: Swift
- Homepage:
- Size: 369 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---------------
Swift JSON Codables
A collection of Swift Codable examples.
Codable is a protocol that allows you to encode and decode custom data types without writing any special code and without having to worry about losing your value types. It's a great way to save time and effort when working with `JSON` data.
---------------
## Table of Contents
- [Getting Started](#getting-started)
- [Resources](#resources)
- [License](#license)
- [Credits](#credits)
## Getting Started
Introduced in Swift 4, the Codable API enables us to leverage the compiler in order to generate much of the code needed to encode and decode data to/from a serialized format, like `JSON`.
- View the codable examples in the [codable](codable.swift) file.
- For this example, we'll be using language codes and names from the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) standard.
## Resources
- [Swift](https://swift.org/)
- [Swift Codable](https://developer.apple.com/documentation/swift/codable)
- [Swift Codable Tutorial](https://www.raywenderlich.com/3418439-encoding-and-decoding-in-swift-with-codable)
## License
This project is released under the terms of **The Unlicense**, which allows you to use, modify, and distribute the code as you see fit.
- [The Unlicense](https://choosealicense.com/licenses/unlicense/) removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the [LICENSE](LICENSE) file in this repository.
## Credits
**Author:** [Scott Grivner](https://github.com/scottgriv)
**Email:** [scott.grivner@gmail.com](mailto:scott.grivner@gmail.com)
**Website:** [scottgrivner.dev](https://www.scottgrivner.dev)
**Reference:** [Main Branch](https://github.com/scottgriv/swift-json_codables)
---------------