What YAML is
YAML uses indentation instead of brackets. It is a superset of JSON, supports comments, and is meant to be edited by hand.
Kubernetes manifests, CI pipelines, Ansible playbooks and most modern config files.
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 YAML to JSON
A YAML list of maps reads as rows and columns directly. Anchors and aliases are resolved before the table is built, so a repeated block arrives expanded rather than as a reference.
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.
Comments do not survive, because JSON has no syntax for them. Everything after a hash in your YAML is gone from the output, which is worth knowing if the comments were doing documentation work.
Anchors and aliases are expanded. A block defined once and reused three times arrives as three full copies, because JSON has no way to reference a value defined elsewhere.
YAML's type coercion has already happened by the time the table is built. If your source had an unquoted NO in a country column, it arrives as false. Quoting it in the YAML is the fix, and it has to happen before the conversion.
What carries over from YAML to JSON
JSON can express everything YAML holds about a table, so this conversion is about shape rather than loss.
Both formats record types, so numbers, booleans and nulls survive as themselves rather than as text.
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.