Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 216
What is a comparison of YAML and JSON?
Answer options
- A. YAML has a more consistent approach to representing data compared to JSON.
- B. JSON does not support comments and YAML does.
- C. YAML is a more verbose data structure compared to JSON.
- D. JSON has more common usage in configuration management tools compared to YAML.
Correct answer: B
Explanation
The correct answer is B because JSON indeed does not allow comments, while YAML does, making it more flexible for including explanations. Option A is incorrect as both formats have their own consistency, and it is subjective. Option C is wrong because YAML is generally considered less verbose than JSON. Option D is misleading, as while JSON is widely used, YAML is also commonly used in configuration management tools.