Get the latest tech news
JSON is not a YAML subset (2022)
People on the internet believe that JSON is a subset of YAML, and that it's safe to parse JSON using a YAML parser: Following this advice will end badly because JSON is not a subset of YAML. It is easy to construct JSON documents that (1) fail to parse as YAML, or (2) parse to valid but semantically different YAML.
Following this advice will end badly because JSON is not a subset of YAML. This behavior produces surprising outcomes, and has been named The Norway Problem. A similar issue affects JSON documents passed to a YAML parser when dealing with numbers in exponential notation.
Or read this on Hacker News