200-901 · Question #10
Refer to the exhibit. Which JSON is equivalent to the XML-encoded data? A. B. C. D.
The correct answer is C. { "books": { "science": { "biology": "10.00", "geology": "9.00", "chemistry": "8.00" }, "math": { "calculus": "20.00", "algebra": "12.00" } } }. Converting XML-encoded hierarchical data to its JSON equivalent requires correctly mapping nested XML elements to nested JSON objects with matching key-value pairs.
Question
Refer to the exhibit. Which JSON is equivalent to the XML-encoded data? A. B. C. D.
Exhibits
Options
- A{ "books": { "science": { "biology": "10.00", "geology": "9.00", "chemistry": "8.00" }, "math": { "calculus": "20.00", "algebra": "12.00" } } }
- B{ "books": { "science": { "biology": "10.00", "geology": "9.00", "chemistry": "8.00" }, "math": { "calculus": "20.00", "algebra": "12.00" } } }
- C{ "books": { "science": { "biology": "10.00", "geology": "9.00", "chemistry": "8.00" }, "math": { "calculus": "20.00", "algebra": "12.00" } } }
- D{ "books": { "science": { "biology": "10.00", "geology": "9.00", "chemistry": "8.00" }, "math": { "calculus": "20.00", "algebra": "12.00" } } }
How the community answered
(66 responses)- A2% (1)
- B2% (1)
- C94% (62)
- D3% (2)
Why each option
Converting XML-encoded hierarchical data to its JSON equivalent requires correctly mapping nested XML elements to nested JSON objects with matching key-value pairs.
Choice A incorrectly structures or orders the JSON object such that it does not faithfully replicate the hierarchy or values present in the source XML.
Choice B contains a structural or value mismatch that does not accurately reflect the nesting and data from the original XML-encoded document.
Choice C correctly represents the hierarchical XML structure as a nested JSON object, with 'books' as the root key containing 'science' and 'math' sub-objects, each holding the appropriate leaf key-value pairs with their numeric string values. Proper JSON encoding preserves the parent-child relationships expressed in the original XML elements.
Choice D misrepresents the XML data by using an incorrect structure or incorrect key-value assignments that diverge from the source XML.
Concept tested: XML to JSON data format conversion
Source: https://developer.cisco.com/docs/platform-introduction/
Topics
Community Discussion
No community discussion yet for this question.



