Book Image

Mastering Swift

By : Jon Hoffman
Book Image

Mastering Swift

By: Jon Hoffman

Overview of this book

Table of Contents (22 chapters)
Mastering Swift
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. Working with XML and JSON Data

For years, I used Extensible Markup Language (XML) as the format of choice to exchange data between systems. Its simplicity, readability, and ease of use made it an easy choice. The only real drawback with XML, in my opinion, is the large size of the XML documents. Mobile devices, such as iOS devices, rely on exchanging data over mobile networks when they are not connected to a Wi-Fi network. These mobile networks are generally slower than a standard Wi-Fi or cabled network connection. Most mobile devices also have data plans that limit the amount of data a user can use in a given month. That was when I really started looking at using JavaScript Object Notation (JSON) to exchange data between systems. Now, I almost exclusively use JSON to exchange data especially with mobile devices. Even though, for mobile development, JSON seems to be becoming the format of choice, XML is still very widely used because it is generally easier to read and use than...