Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 467
How do JSON and XML compare?
Answer options
- A. The syntax of JSON contains tags, elements, and attributes whereas XML objects are collections of key-value pairs.
- B. JSON objects are an ordered set of element attributes whereas XML arrays are an unordered set of key-value pairs.
- C. The syntax of XML contains tags, elements, and attributes whereas JSON objects are collections of key-value pairs.
- D. JSON arrays are an unordered set of key-value pairs whereas XML objects are an ordered set of element attributes.
Correct answer: C
Explanation
Answer C is correct because XML is characterized by its use of tags, elements, and attributes, while JSON is based on key-value pairs. The other options misrepresent the structures of JSON and XML, incorrectly describing their characteristics and how they organize data.