Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on YAML

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

General Tips and Traps

  1. YAML is much better alternative to JSON. TOML is another good alternative to YAML.

Ranges in YAML

https://stackoverflow.com/questions/48199439/use-range-with-stepsize-in-yaml-file

YAML for Rust

Please refer to Parse YAML in Rust for discussions.

YAML for Python

Please refer to Parsing YAML in Python for discussions.

YAML for JVM-based Languages

  1. SnakeYaml is a high quality YAML library for JVM-based languages (Java, Scala, etc.) circe-yaml is a Scala library for parsing YAML.

JINJA & YAML

https://docs.saltstack.com/en/latest/topics/jinja/index.html

https://medium.com/@deepak7093/dynamic-code-generator-using-yaml-config-and-jinja2-templates-31d8b9663fb0

References

https://www.baeldung.com/java-snake-yaml

Strings in YAML - To Quote or not to Quote

https://yaml.org/

https://yaml.org/spec/1.2/spec.html#directive/

Comments