I just checked YAML 1.2 and it seems that 1024 limit length on keys still in spec (https://yaml.org/spec/1.2.2/, ctrl+f, 1024). So any JSON with long keys is not compatible with YAML.
> An implementation may set limits on the length and character contents of strings.
So this length limit is not a source of incompatibility with JSON.
There was also an article here some time ago but I cannot find it right now.
I'm not even sure why I'm playing the devil's advocate, I hate Yaml actually :D