A value is one of: string, number, object, array, true, false, or null.

Since v0.9.0.0 a value of any of these types may be the whole document — not just an object.

Arrays

An array is a [ ]-delimited, comma-separated list of values.

A trailing comma after the last element is allowed (since v0.9.0.0):

retries: [1, 2, 5,]

In the library, an array element carries its own leading comments and a trailing end-of-line comment (Element), so a commented array round-trips exactly:

ports: [
  80,    // http
  443,   // https
]

The leaf types

ValueNotes
true / falsebooleans
nullthe null value
stringStrings & escapes, [Multi-line `\`-blocks](/notation/multiline)
numberNumbers — decimal, hex, Infinity, NaN, leading/trailing dot
objectObjects & members
arrayabove

The model mirrors this: Value is the abstract base with Null, Boolean, String, Number and the containers Object / Array.