© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. NekrasovSwift Recipes for iOS Developershttps://doi.org/10.1007/978-1-4842-8098-0_2

2. Working with JSON and Other Popular Formats

Alexander Nekrasov1  
(1)
Moscow, Russia
 

Data in Swift is much more than basic types, arrays, and dictionaries. Also, a mobile app is rarely isolated from the outer world. It makes API requests and processes responses; it exchanges data with cloud services and works with SDKs. Let’s see how to work with data exchange and safely convert numbers between different units.

How Devices Exchange Data

Nowadays, it’s hard to imagine a computing device without external data interfaces. Even simple electronic devices like a coffee machine ...

Get Swift Recipes for iOS Developers: Real-Life Code from App Store Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.