Leave a rating/review
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.
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.