A 10 minute read covering some YAML edge-cases that you should have in mind when writing complex YAML files

  • @[email protected]
    link
    fedilink
    -14 days ago

    If you’re comparing YAML with JSON, it displays that you understand neither.

    JSON is designed for data exchange between systems. YAML is designed to describe data for a single system, and is always subject to individual implementations.

    They are not interchangeable concepts.

    • @[email protected]
      link
      fedilink
      53 days ago

      all json is valid yaml and can be parsed with a yaml parser. Yaml is literally a superset of json. In what world are they not comparable?

    • @teolan
      link
      33 days ago

      YAML 1.2 is a superset of JSON. Every valid JSON is valid YAML 1.2

    • @[email protected]OP
      link
      fedilink
      23 days ago

      They are both serialization formats that are supposed to be able to represent the same thing. Converting between these 2 formats is used in the article as a way to highlight yaml’s parsing quirks (since JSON only has a single way to represent the false boolean value, it makes it clear that the no value in yaml is interpreted as a boolean false and not as the "no" string)

      Anyway, I disagree with your point about YAML and JSON not being interchangeable