Guided Notes

Extract: JSON & XML

Reading JSON with pandas and the json module, JSON orientations, and parsing XML with ElementTree.

JSON and XML

Slide 1 / 5

JSON and XML are the two most common formats for data sent between systems β€” especially by web APIs. The World Bank offers its indicator data in both.

JSON (JavaScript Object Notation) stores data as nested key–value pairs and lists β€” it maps directly onto Python dictionaries and lists.

XML (eXtensible Markup Language) is older and wraps data in named tags, like HTML.

JSON is usually more compact, which is one reason it has become more popular.

← Extract: CSV Files