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

XML and JSON


It was not that long ago when the majority of consumer-based applications were self-contained and did not need to exchange data with external services. However, in today's age of smartphones and data-driven applications, it is now rare to develop applications that do not need to exchange data with external services. This makes it essential for application developers to know how to exchange data in standard formats.

API designers these days tend to favor one of two formats to exchange data—XML or JSON. There have been a number of other data exchange formats that have been promoted over the years, but XML and JSON are, by far, the current leaders.

In terms of simplicity, openness, and interoperability, XML and JSON are unmatched by the other data exchange formats, which is why they are so appealing to API designers. It would be hard to find a public web API that does not offer XML and/or JSON to exchange data.

Apple has provided simple and efficient APIs to work with both XML and...