An object is a { }-delimited, comma-separated list of members.

A member is:

[--] key : value

A %include directive may stand where a member stands — see Include directives.

Trailing comma

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

{
  a: 1,
  b: 2,
}

Duplicate keys

Two active members with the same key are a parse error ("duplicate member 'x'") — but the duplicate is still stored structurally, so no source information is lost and the rest of the file still parses. Two disabled members may share a key freely, and a disabled member may share its key with an active one.

In the library

The distinction the -- prefix creates runs right through the API: Object's query API (size / contains / find / at / set / remove, and the dotted-path getters) skips disabled members entirely, while its member API (memberCount / getMember / appendMember / eraseMember) sees everything; disable() / enable() flip the flag without moving or losing the member.