2 ms·
JSON to YAML is super easy, and back too. That's what we do here. YAML+comments is generated by humans, conver to JSON, merged with JSON made by machines into f
by edoceo 7y ago
JSON to YAML is super easy, and back too. That's what we do here. YAML+comments is generated by humans, conver to JSON, merged with JSON made by machines into final JSON configs used by loads of apps. And dumping the whole thing, or parts back out to YAML is trivial.
- polymonster 7y agoYeah, in hindsight maybe we could just switch to YAML but it does have quite a lot more syntax. Jsn started as a python function which removed comments and fixed trailing commas. YAML does not come bundled with python and is an external dependency.. I suppose looking at it now jsn grew to a point where using something else in the first place would have been less work :)
- yori 7y agoThank you for acknowledging that YAML could have been an alternative choice. But don't let such alternatives stop you from hacking your own solution or scratching your itch. If every person on the earth, stopped developing their own solution because there is an alternative that works with limitations we will see no progress in technology. It is good to develop your solution and then come to the conclusion that there is a better alternative than not having tried at all.