What XML is
XML marks up data with nested named tags and optional attributes. It is verbose, strict about being well-formed, and can carry a schema that says what shape a document must have.
Enterprise integrations, government data feeds, RSS, SOAP services and older document formats.
What JSON is
JSON is a text format for nested data: objects with named keys, arrays, strings, numbers, booleans and null. It has no date type and no comments.
Every web API, most configuration files and anything that talks to JavaScript.
What changes when you convert XML to JSON
The first repeating element is treated as the rows. Attributes are read alongside child elements and prefixed so they do not collide with a same-named tag. Nesting one level deep becomes dotted column names; deeper structures are kept as text.
You choose the shape. An array of objects is the default and the one most code expects. A 2D array is smaller. Column arrays suit charting libraries. A keyed object suits lookups by id.
The repeating element becomes the rows. An XML document has one root and usually one wrapper element holding the records; the first array found while walking down is treated as the data, and the wrappers above it are ignored because they carry no values of their own.
Attributes come across alongside child elements, prefixed with an @ so they cannot collide with a same-named tag. An element with both an id attribute and an id child gives you @id and id as separate columns.
XML makes no distinction between a number and the text of a number, so everything arrives as text. Turn type inference on if you want JSON numbers and booleans out the other side.
What carries over from XML to JSON
JSON can express everything XML holds about a table, so this conversion is about shape rather than loss.
JSON wants a type for each column, and XML does not record one, so each column is typed from what its values look like. A column of digits that should stay text - a zip code, a phone number, a leading-zero id - is the usual thing to check afterwards.
The identifier 007 comes out of the JSON as 007. Reading it as a number would have made it 7, and an id that changes value is worse than one that stays text.
The role "Analyst, data" survives with its comma, in one cell rather than split across two. That is the first thing to check in any converted table, and the usual place a JSON file goes wrong.
The quotes around Jonah "Jo" Pryce are escaped with a backslash in the JSON.