← Back to context

Comment by Cthulhu_

5 hours ago

Plus it hyperfocuses and compares to JSON, but there's many popular configuration languages that should be compared with as well like YAML, TOML, etc.

That's because MAML is a superset of JSON. It has some added features (comments, multiline strings, etc), but it will likely be confused for JSON upon first glance. MAML will also have to reference JSON implementations to resolve ambiguities, e.g. how to handle multiple identical array keys. So MAML can not live outside the JSON world.

  • > MAML will also have to reference JSON implementations to resolve ambiguities, e.g. how to handle multiple identical array keys

    Isn’t the spec (https://maml.dev/spec/v0.1), which says “Duplicate keys are not allowed within an object.” sufficient for that?

    Or am I misunderstanding what you mean by “array keys”?

    It seems the spec is silent on whether key order is significant in dictionaries, though.

  • No way to confuse with JSON, where you would instead expect // or /* */ for a comment facility which align with Javascript.

    Also """ for multiline string, I only encountered that in Python. But apparently Java, Kotlin and Swift also do that now. In js, backquote already do the trick.

    And the project is targeting more on configuration file, where TOML or YAML indeed are already competitors just as historically valid as JSON.