XK0-005 · Question #829
Which of the following characteristics of YAML and JSON are the most accurate?
The correct answer is B. Due to its ease of use and broad compatibility, JSON is frequently used for configuration files and. JSON is widely used for data interchange in web APIs and configuration files due to its simplicity, broad compatibility, and human-readable format.
Question
Which of the following characteristics of YAML and JSON are the most accurate?
Options
- AJSON uses indentation and substantial white space, while YAML relies on curly braces and
- BDue to its ease of use and broad compatibility, JSON is frequently used for configuration files and
- CJSON is a data interchange format used for configuration files and APIs, whereas YAML is a
- DYAML is preferred for its rigorous data type and significant support for complex data structures,
How the community answered
(31 responses)- A3% (1)
- B90% (28)
- C6% (2)
Why each option
JSON is widely used for data interchange in web APIs and configuration files due to its simplicity, broad compatibility, and human-readable format.
This statement incorrectly swaps the characteristics: JSON relies on curly braces and square brackets, while YAML uses indentation and white space.
JSON (JavaScript Object Notation) is a lightweight, language-independent data interchange format that is easy for humans to read and write and easy for machines to parse and generate. Its simplicity and widespread support make it ideal for web service APIs and application configuration files.
This statement is incomplete and somewhat misleading; while JSON is used for those purposes, YAML is also a data interchange format, often favored for configuration files due to its human-friendliness.
While YAML supports complex data structures and is often preferred for human-readability, JSON also has strong data typing, and YAML's typing can sometimes be ambiguous. The statement incorrectly implies JSON lacks 'significant support for complex data structures'.
Concept tested: Characteristics of JSON data format
Source: https://www.json.org/json-en.html
Topics
Community Discussion
No community discussion yet for this question.