JSON vs YAML

JSON is strict data interchange; YAML adds comments and compact indentation.

Syntax

# YAML
name: Alice
active: true

# JSON
{"name": "Alice", "active": true}

Explanation

Choose JSON for APIs and strict validation, YAML for human-edited configuration.