I accidentally used YAML.parse instead of JSON.parse and it worked
YAML was <i>intended to be</i> a superset, but it isn't quite, which is about the worst case scenario. See <a href="https://metacpan.org/pod/JSON::XS#JSON-and-YAML" rel="nofollow">https://metacpan.org/pod/JSON::XS#JSON-and-YAML</a> , for instance.<p>(I am an absolutist on this matter. To be a superset, <i>all</i>, that's A L L valid JSON strings must also be valid YAML to be a superset. A single failure makes it not a superset. At scale, any difference will eventually occur, which is why even small deviations matter.)