• Voroxpete@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 hours ago

    Yeah, this is my biggest annoyance with JSON. As a data structure it’s very elegant, but it only really makes sense to people who know how to code, and without the ability to add comments you have to rely heavily on external documentation to make it readable to most users.

    • cravl@slrpnk.net
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 hours ago

      And like yeah, both the wonderful (and foss!) .json5 and Microsoft’s semi-proprietary(?) .jsonc exist, but most projects just use their language’s default JSON parser that doesn’t recognize them. What I would personally love to see is .json5 support baked into the default JSON parsing libraries of Python, Go, etc. (Enabled by a flag, likely.) It’s a superset of regular JSON and fully ES2019 compatible, so there shouldn’t be any issues.