petersumskas 5 hours ago

Douglas Crockford addressed this many years ago: write your human readable config with comments and run it through a pre-processor to strip them out before handing the config to a JSON parser. Seems like almost no one picked up on the idea.

  • ulrikrasmussen 4 hours ago

    That is such a horrible non-solution. It breaks all tooling which isn't aware of your particular preprocessor and adds a compilation step to every configuration.

  • benhurmarcel 4 hours ago

    > write your human readable config with comments

    The question then becomes: what format is that?

  • seanhunter an hour ago

    > Seems like almost no one picked up on the idea.

    Seems to me more like almost no one thought the idea was any good.

sebazzz 41 minutes ago

JSON5 is what that is called and it already has wide support.

krapp 6 hours ago

Use Lua tables. Lua's parser is smaller than many JSON parsers, the syntax is almost the same and you can use comments.

  • Bolwin an hour ago

    On the web? In wasm? I'd much rather use a new format. MAML's parser is 2kb of js gzipped according to the repo and very fast.