nerdexam
Cisco

200-901 · Question #133

Refer to Exhibit. Which JSON is equivalent to the XML-encoded data? A. B. C. D.

The correct answer is B. { "books": { "science": { "biology": "10.00", "geology": "9.00" }, "math": { "calculus": "20.00" } } }. The correct answer is B. The XML structure shows a 'books' root element with two child categories: 'science' (containing 'biology' at 10.00 and 'geology' at 9.00) and 'math' (containing 'calculus' at 20.00). In the equivalent JSON, 'science' and 'math' should be sibling keys…

Understanding and Using APIs

Question

Refer to Exhibit. Which JSON is equivalent to the XML-encoded data? A. B. C. D.

Exhibits

200-901 question #133 exhibit 1
200-901 question #133 exhibit 2
200-901 question #133 exhibit 3

Options

  • A[ { "books": { "science": { "biology": "10.00", "geology": "9.00" }, "math": { "calculus": "20.00" } } } ]
  • B{ "books": { "science": { "biology": "10.00", "geology": "9.00" }, "math": { "calculus": "20.00" } } }
  • C{ "books": { "science": { "biology": "10.00", "geology": "9.00", "math": { "calculus": "20.00" } } } }
  • D{ "books": [ { "science": { "biology": "10.00", "geology": "9.00" }, "math": { "calculus": "20.00" } } ] }

How the community answered

(43 responses)
  • A
    12% (5)
  • B
    79% (34)
  • C
    7% (3)
  • D
    2% (1)

Explanation

The correct answer is B. The XML structure shows a 'books' root element with two child categories: 'science' (containing 'biology' at 10.00 and 'geology' at 9.00) and 'math' (containing 'calculus' at 20.00). In the equivalent JSON, 'science' and 'math' should be sibling keys directly under 'books'. Answer B correctly represents this flat, parallel structure. Answer A is incorrect because it wraps the object in an array unnecessarily. Answer C is incorrect because it nests 'math' inside 'science', implying a parent-child relationship that doesn't exist in the XML. Answer D is incorrect because it places 'books' content inside an array with 'science' and 'math' as object properties of a single array element.

Topics

#XML#JSON#Data Serialization#API Data Formats

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice