3 ms·
> I have no idea how to help with YAML omnipresence in Kubernetes. More than a half of my problems at a $daily_job There are two good features in YAML: multili
by zamalek 3y ago
> I have no idea how to help with YAML omnipresence in Kubernetes. More than a half of my problems at a $daily_job
There are two good features in YAML: multiline strings, and YAML is a JSON superset. You can use anything that generates JSON to generate YAML.
Nickel can be evaluated to JSON: https://nickel-lang.org/ https://nickel-lang.org/
- marcosdumay 3y ago> YAML is a JSON superset On the sense that any JSON file is a valid YAML file. But absolutely not in the sense that you can just treat your json file as YAML and expect it to contain the correct data.
- skitter 3y agoHm, what JSON documents have a different meaning in YAML? I'd have hoped that with all names & strings being quoted and leading zeros being disallowed, that wouldn't be the case.
- zamalek 3y agoI have never come across a case where JSON can't take the place of YAML, but I guess there could be edge cases.
- marcosdumay 3y agoYou can easily corrupt the meaning of your JSON by adding whitespace in YAML.
- maple3142 3y agoMaybe duplicate keys in JSON counts? Some JSON parsers choose the first and some choose the last, and YAML directly forbid that.
- kunley 3y agoExactly my thought. Is it that an academic property, or are people serious about throwing JSON into running software that parses YAML and expect good results? (Should I add: on production, because I want my tools to be used on production, but that's just me)