Config Files

JSON

Basic Types

{
  "Numbers": [100, 3.14, 1e-3],
  "Strings": ["hello", "are you ok"],
  "Booleans": [true, false],
  "Nulls": [null]
}

Collection Types

{
  "Array (single-line)": [1, 2, 3],
  "Array (multi-lines)": [
    1,
    2,
    3
  ],
  
  "Object (single-line)": { "id": 1, "name": "apple" },
  "Object (multi-lines)": {
    "id": 1,
    "name": "apple"
  }
}

YAML

Doc (opens in a new tab)

Basic Types

Numbers: [100, 3.14, 1e-3]
Strings: [hello, are you ok]
Booleans: [true, True, TRUE, false, False, FALSE]
Nulls: [null, Null, NULL, ~]

Collection Types

Array (single-line): [1, 2, 3]
Array (multi-lines-1): [
  1,
  2,
  3,
]
Array (multi-lines-2):
  - 1
  - 2
  - 3
 
Object (single-line): { id: 1, name: apple }
Object (multi-lines-1): {
  id: 1,
  name: apple,
}
Object (multi-lines-2):
  id: 1
  name: apple