The Property List Format

In a property list, values are assigned to names. This is done as in the following example:

name = value;

Each assignment ends with a semicolon. The values in the property lists can be strings, dictionaries (lists of name-value pairs) or arrays (lists of values).

String

A string is a sequence of characters enclosed in quotation marks or any combination of the characters ‘a’ - ‘z’, ‘A’ - ‘Z’, ‘0’ - ‘9’ and the underline ‘_’ character.

Permitted strings are for example:

String
"Sequence of characters"

Quotation marks can be used in strings enclosed in quotation marks if they are preceded by a backslash as in the following example:

"The word \"and\" consists of three characters"

Dictionary

A dictionary is a list of name-value pairs which starts with a left curly bracket and ends with a right curly bracket:

server = {
  host = localhost;
  tclPort = 3001;
  secondPort = 3002;
};

Each value from a name-value pair in a dictionary can be a string, an array or another dictionary.

Array

An array is a list of strings, dictionaries or arrays which starts with a left parenthesis and ends with a right parenthesis. The elements in a list are separated by commas. The following examples give the permitted arrays:

name1 = (An, array, with, "five", elements);
name2 = ((An, array), with, (three, elements));
name3 = (
  {
  name1 = An;
  name2 = array;
  },
  {
  name3 = from;
  name4 = (two, dictionaries);
  }
);

Comments

Property lists can contain comments. Two backslashes start a comment which covers the rest of the line:

// This is the first comment

Comments which are enclosed with data must start with the string ”/*” and end with the string ”*/” as in the following example:

/* This is the second comment */