3 ms·
There are parsers for it in every language, and it's more capable than JSON. Here's what I want. Something that is more readable than JSON, so either TOML-like
by ironmagma 5y ago
There are parsers for it in every language, and it's more capable than JSON.
Here's what I want. Something that is more readable than JSON, so either TOML-like or YAML-like, but without executable code or any of that nonsense. On top of that, a schema definition file (think XSD) that asserts facts about the structure of the config, using a theorem prover like Coq or Idris.
This way, we get nice configs, but within a restricted space.
- ViViDboarder 5y agoDo YAML or TOML have executable code? I think the YAML as code comes from using YAML as a DSL and writing an interpreter.
- bmn__ 5y agoSome software dealing with YAML had the ability to execute code by accident, see comment thread <https://news.ycombinator.com/item?id=22849761 https://news.ycombinator.com/item?id=22849761>.
- ViViDboarder 5y agoSure. That’s not a YAML problem as it’s not part of the spec. Someone could to the exact same thing with JSON and use a custom spec that is a string starting with a bang and executes it. I think the reason people don’t is that JSON is terrible for writing my hand and YAML isn’t.