What is JSON?
JSON is the shape data arrives in when it comes from an API. Tabular data usually lands as an array of objects, one per row, with the column names repeated as keys in every single one - verbose to read, but unambiguous.
What is XML?
XML is the verbose, strict ancestor of most structured data formats, and it is still what enterprise systems, publishing pipelines and older APIs exchange. Tabular data in XML is usually a repeating row element with one child per column.