Which statement best contrasts YAML with JSON?
Trap 1: YAML can represent only arrays, while JSON can represent only…
Both formats can represent far more than arrays or strings only.
Trap 2: JSON requires indentation but YAML requires curly braces
The description reverses the typical syntax characteristics.
Trap 3: YAML is a routing protocol and JSON is an access method
Neither YAML nor JSON is a routing protocol or an access method.
- A
YAML is commonly more human-readable, while JSON is widely used in APIs
Correct. This is the most accurate contrast among the choices.
- B
YAML can represent only arrays, while JSON can represent only strings
Why wrong: Both formats can represent far more than arrays or strings only.
- C
JSON requires indentation but YAML requires curly braces
Why wrong: The description reverses the typical syntax characteristics.
- D
YAML is a routing protocol and JSON is an access method
Why wrong: Neither YAML nor JSON is a routing protocol or an access method.