# Data Types

## Overview

| Data Type                                                         | Description                           |
| ----------------------------------------------------------------- | ------------------------------------- |
| [Integer](https://swift.sedatonat.dev/codes/data-types/numbers)   | Whole numbers                         |
| Floating points                                                   | Decimal numbers                       |
| [Doubles](https://swift.sedatonat.dev/codes/data-types/numbers)   | Decimal numbers with higher precision |
| [Strings](https://swift.sedatonat.dev/codes/data-types/strings)   | Characters and Text                   |
| [Booleans](https://swift.sedatonat.dev/codes/data-types/booleans) | True / False                          |

Saving = Persistence

JSON => **J**ava**S**cript **O**bject **N**otation

### JSON Data Types

* Bool
* Integer & Floating-Point numbers
* String
* Array
* Dictionary \<String, Any>
* Data: Encoded using Strings
* Date: ???

### Notes

* Integers are precise numbers.
* Double Formats are not as precise as Integers. They have a little bit of inaccuracy.
* Swift will not allow implicitly calculating Integers and Doubles together for the sake of type safety. So we should choose one of the number formats.

## Sources

### Videos

### Articles / Documents

* <https://www.hackingwithswift.com/quick-start/beginners/how-to-store-decimal-numbers>
