Remix.run Logo
M95D 2 days ago

So why not give "the yaml document from hell" in KSON as an example so we can see for ourselves how good it is?

bdubbeldam 2 days ago | parent [-]

That's a great idea, we've just added it to the playground. Here's the KSON, much of YAML's leanness and simplicity without the footguns:

  server_config:
    port_mapping:
    # Expose only ssh and http to the public internet.
      - '22:22'
      - '80:80'
      - '443:443'
    serve:
      - '/robots.txt'
      - '/favicon.ico'
      - '*.html'
      - '*.png'
      # Do not expose our Git repository to the entire world.
      - '!.git'
    geoblock_regions:
      # The legal team has not approved distribution in the Nordics yet.
      - dk
      - fi
      - is
      - no
      - se
    flush_cache:
      on: [push, memory_pressure]
      priority: background
      .
    allow_postgres_versions:
      - '9.5.25'
      - '9.6.24'
      - '10.23'
      - '12.13'
Testing this actually helped us catch a bug - of course our transpiler hits the Norway problem when converting to YAML. Thanks for helping us with the beta! Fix coming soon.
M95D 2 days ago | parent [-]

Except for the dot after "priority:background", that's a valid YAML. I tried 3 online converters to JSON and all of them worked with no footguns. So maybe "the yaml document from hell" is the actual problem, not YAML?