CompTIA Linux+ (XK0-004) — Question 21

Which of the following is a difference between YAML and JSON?

Answer options

Correct answer: A

Explanation

The correct answer is A because YAML permits comments, which enhances readability and documentation, while JSON does not allow comments. Options B and C are incorrect as both JSON and YAML have flexible syntax, and both can be used in various contexts beyond those mentioned. Option D is also false as YAML is not deprecated; it is still widely used alongside JSON.