Swift macOS Programming – Loading and Parsing JSON in my Template App

A live coding streamed session where I am working on an app that serves a purpose I needed. It allows me to create markdown frontmatter for my GatsbyJS sites.

This session also taught me one very valuable lesson… never forget that you used a Dictionary and not an Array whilst live streaming 🙂 We all have those moments!

The goal of this session was to refactor the template key dropdown in the UI. This has a list of post templates that I use, each is a key-value pair but the problem is they are stuck in the code. I wanted to change that to an external file and this is the start of that process.

I added a JSON file which enables me to add/remove/edit templates without the need to recompile. The next step will be to make the file location configurable.