• floquant
    cake
    link
    fedilink
    633 months ago

    YAML is redeemed by one thing only:

    All JSON is valid YAML.

      • @Jayjader@jlai.lu
        link
        fedilink
        14
        edit-2
        3 months ago

        Yup! YAML is defined as a “strict superset” of JSON (or at least, it was the last time I checked).

        It’s a lot like markdown and HTML; when you want to write something deeply structured and somewhat complex you can always drop back/down to the format with explicit closing delimiters and it just works™.

        • Terrasque
          link
          fedilink
          83 months ago

          I found out the hard way this is not entirely correct, as a user found a valid json that yaml parsers didn’t handle. IIRC it was some exotic whitespace issue

          • floquant
            cake
            link
            fedilink
            73 months ago

            Yes, in true YAML fashion, there are some edge cases where things act weird but are technically correct.