Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 112
How do XML and JSON compare regarding functionality?
Answer options
- A. XML provides more support for mapping data structures into host languages than JSON.
- B. XML provides more human readability than JSON.
- C. JSON provides less support for data types than XML.
- D. JSON natively supports arrays and XML does not natively support arrays.
Correct answer: D
Explanation
The correct answer is D because JSON does indeed natively support arrays, allowing for the direct representation of lists, whereas XML does not have a native array construct and requires additional complexity to represent similar structures. Option A is incorrect as JSON also offers mapping capabilities, and option B is false since JSON is typically considered more human-readable. Option C is misleading because JSON supports basic data types like strings and numbers, which are sufficient for many applications.