Property list

They are also used to store information about bundles and applications, a task served by the resource fork in the old Mac OS.

Since the data represented by property lists is somewhat abstract, the underlying file format can be implemented many ways.

Under NeXTSTEP, property lists were designed to be human-readable and edited by hand, serialized to ASCII in a syntax somewhat like a programming language.

[4] GNUstep adopts the NeXTSTEP format, with additions for representing NSValue and NSDate data types.

[7] Two relative independent plist handlers are found in GNUstep: the CFPropertyList in libs-core-base (CoreFoundation), and the NSPropertyList in libs-base (Foundation Kit).

[8] GNUstep provides a set of plist command-line tools based on NSPropertyList, including a version of pl[9] and defaults.

In Mac OS X 10.7, support for reading and writing files in JSON format was introduced.

[b] In terms of the internals, Apple provides an open source parser for old style, XML, and binary formats in their C Core Foundation code as CFPropertyList.

Additionally, Apple provides support in Xcode for editing property lists in a hierarchical viewer/editor that can handle plists formatted in binary or XML, but not JSON.

As of Mac OS X 10.4, Apple provides an AppleScript interface for reading property list files through the System Events application.

As of Mac OS X 10.5, Apple provides an AppleScript interface for editing, creating and writing property list files as well.

[15] Apple describes the implementation as opaque in its plist(5) manual page documentation,[16] which means that reliance on the format is discouraged.

The array, set and dictionary binary types are made up of pointers - the objref and keyref entries - that index into an object table in the file.

This means that binary plists can capture the fact that - for example - a separate array and dictionary serialized into a file both have the same data element stored in them.

Since property lists do not capture all the information and data types required to describe an arbitrary object, an extra layer of encoding and decoding is often done.

[18] Two main coders exist for the purpose of serializing objects to plists: Among other things, using an archiver allows for new datatypes to be encoded without changing the plist format itself and it is the preferred way for Apple to encode things like NSSets and null values.

Parsing the formats do prove a bit harder, since one more layer must be followed even for some classes plists were supposed to support.

[21] There is not a single, standardized path language for property lists like XPath does for XML, but informal conventions used by various programs exist.

On Windows the Apple plist files are stored in the user's home directory under %USERPROFILE%\AppData\Roaming\Apple Computer.