With just a few lines of code, you can read/write collections to/from files. The code below shows examples for writing and reading both NSArray and NSDictionary objects, the same logic would apply to an NSSet (or other collection type).
Before we get started, a quick note, to use literals you will need to be running Xcode 4.4 or greater as well as the Apple LLVM compiler 4.0 or greater.
As with NSString objects, which allow definition using literal syntax:
NSString *str = @"Some string";
you can now create NSDictionary objects using literals. A range of examples follow, showing the old style definition as well as the new literal syntax: