What YML 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 YML 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.
There is no difference between .yml and .yaml. The three-letter form is older and survives because some Windows tooling once cared about extension length. Both are the same format and both parse identically here.
Comments are dropped, because JSON has no syntax for them.
Anchors and aliases are expanded into full copies, since JSON cannot reference a value defined elsewhere.
What carries over from YML 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.