Saving Data in iOS

May 31 2022 · Swift 5.5, iOS 15, Xcode 13

Part 3: Property Lists

22. Comparing JSON & Property Lists

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 21. Challenge: Reading Property Lists Next episode: 23. Conclusion

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 22. Comparing JSON & Property Lists

This course was originally recorded in April 2020. It has been reviewed and all content and materials updated as of November 2021.

Transcript: 22. Comparing JSON & Property Lists

Property lists and JSON are two interesting formats. You can think of Plists as the outgoing format and JSON as the newcomer.

Apple relies heavily on Plists for a lot of things in your projects, like the Info.plist file, or when creating and extracting an application binary via the command line instead of Xcode.

The truth is, when it comes to performance, size, and flexibility, JSON is the clear winner.

Pretty much any modern web API you encounter nowadays will use JSON when returning data or information to you. JSON files are also more commonly shared and used than XML files nowadays. They are smaller in memory size, easier to read, and can handle just about anything you want to store in them.

We wanted to show you how to use both formats as Apple still uses Plists, and because Xcode can make editing and working with them really nice.

If you plan to work on Apple platforms then using Plists over JSON is a valid choice, in reality, thouigh it’s rare to find anything but JSON nowadays, specially when communicating with web servers.

In either case you have the knowledge work with both, and Codable makes it easy and seamless to encode or decode from either format.