An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          









Swift Badge


GitHub Badge
Email Badge
BuyMeACoffee Badge


Bronze

---------------

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)

---------------