# Codable

## Overview

It is used for archiving and unarchiving data with converting objects into plain text and back again.

## Codable

{% embed url="<https://youtu.be/lZtGgb4aOdQ>" %}
[Hacking with Swift / 100 Days / Day-36 - Archiving Swift objects with Codable](https://www.hackingwithswift.com/books/ios-swiftui/archiving-swift-objects-with-codable)
{% endembed %}

{% embed url="<https://youtu.be/oft_XpwdBf0>" %}
[Hacking with Swift / 100 Days / Day-39 - Working with hierarchical Codable data](https://www.hackingwithswift.com/books/ios-swiftui/working-with-hierarchical-codable-data)
{% endembed %}

{% embed url="<https://youtu.be/1z9WsuxjZr0>" %}
[Hacking with Swift / 100 Days / Day-40 - Loading a specific kind of Codable data](https://www.hackingwithswift.com/books/ios-swiftui/loading-a-specific-kind-of-codable-data)
{% endembed %}

{% embed url="<https://youtu.be/EBoTlP1mnhs>" %}
[Hacking with Swift / 100 Days / Day-40 - Using generics to load any kind of Codable data](https://www.hackingwithswift.com/books/ios-swiftui/using-generics-to-load-any-kind-of-codable-data)
{% endembed %}

## Encodable

## Decodable

## Encoder

## Decoder

## CodingKey

{% embed url="<https://youtu.be/Wfw2wHKCvSI>" %}
[Hacking with Swift / 100 Days / Day-51 - Encoding an ObservableObject class](https://www.hackingwithswift.com/books/ios-swiftui/encoding-an-observableobject-class)
{% endembed %}

\#container #encode #init

...

{% embed url="<https://youtu.be/BWmrASENR5Q>" %}
[Hacking with Swift / 100 Days / Day-51 - Sending and receiving orders over the internet](https://www.hackingwithswift.com/books/ios-swiftui/sending-and-receiving-orders-over-the-internet)
{% endembed %}

\#send #receive #get #post #regres #testserver

## TestServer Reqres.in

\#testserver #reqres

{% embed url="<https://reqres.in>" %}

{% embed url="<https://youtu.be/BWmrASENR5Q>" %}
[Hacking with Swift / 100 Days / Day-51 - Sending and receiving orders over the internet](https://www.hackingwithswift.com/books/ios-swiftui/sending-and-receiving-orders-over-the-internet)
{% endembed %}

## Sources

### Articles / Documents

* [Developer.Apple.com / Article / Encoding and Decoding Custom Types](https://developer.apple.com/documentation/foundation/archives_and_serialization/encoding_and_decoding_custom_types)
