Yaml is probably the briefest common structured text data representation. And thus it’s often a go to for configuration, build and other pipeline files. It’s basically made up of lists of key:value
pairs.
|
|
Use Case: Application Configuration
I discovered while developing the FileArchiver that I didn’t really know how to use ConfigurationManager in .NET, so I started to look through the classes and discovered it was pretty bloated and overly complicated. It left me asking myself “If this was simple what would it look like?” I have used a bit of Yaml to setup Azure DevOps build pipelines before. So the hunt for something to parse a Yaml file was on. A few minutes later and I’d found YamlDotNet, it behaves similarly to NewtonSoft’s Json.NET. It was game on, and a bit later I had a configure file being serialised to a custom configuration object for the project. The solution is not only eloquent, it also saved a whole lot a time given I didn’t have to figure out the object model being used by the System.Configuration object model.
Use Case: Personal Structured Data
Each day I try to make journal entry based on The Five Minute Journal, but I prefer the keyboard to a book and pen, as I’m keen to have the ability (potential at this point) to explore the data for trends that may prompt me to reflect and then plan a changes for the better. The concise and minamalist structure of Yaml make it great for this. Here’s a fabricated example of a journal entry for me. I just keen these in an online Git repo.
|
|