nerdexam
Cisco

200-901 · Question #187

How do XML and JSON compare regarding functionality?

The correct answer is D. JSON natively supports arrays and XML does not natively support arrays.. JSON natively supports arrays using square bracket [] notation, making it straightforward to represent ordered lists. XML has no native array construct - to represent a list, you must repeat sibling elements and rely on the consuming application to interpret them as a collection.

Understanding and Using APIs

Question

How do XML and JSON compare regarding functionality?

Options

  • AXML provides support for mapping data structures into host languages than JSON.
  • BXML provides more human readability than JSON.
  • CJSON provides support for data types than XML.
  • DJSON natively supports arrays and XML does not natively support arrays.

How the community answered

(47 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    6% (3)
  • D
    89% (42)

Explanation

JSON natively supports arrays using square bracket [] notation, making it straightforward to represent ordered lists. XML has no native array construct - to represent a list, you must repeat sibling elements and rely on the consuming application to interpret them as a collection. The other options are inaccurate: JSON (not XML) is generally considered more human-readable for data (B); XML supports complex data structures but JSON has more direct type mappings for primitives (C is poorly worded and not the best answer); and XML does not provide more data-structure mapping support than JSON (A).

Topics

#JSON#XML#Data Formats#Data Structures

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice