DEV Community

P-DR0ZD
P-DR0ZD

Posted on • Edited on

Open Source Lab 4

In lab 4 of the open source course, we worked with git remote and added JSON support for our SSG. For the JSON support, we want to be able to write commands and include a JSON file that has a list of commands and our SSG to read and run the command with the list provided.

What I did

Issue

Pull Request

For this lab, I worked on Tong's SSG created with CPP. Because I've worked with this code previously it was easily navigatable and most of the code was easy to add. The difficulty I had was adding JSON to CPP. CPP has no native JSON reading so I can't just read the file like a JSON file unless I make a custom class or use a library. A custom class in CPP dedicated to reading JSON would probably be the size of another project so I decided that I want to use an already open source library. I did some research and found a couple of the most used ones and asked Tong if there was one he preferred because at the end of the day it was his code so his decision was the most important one. He said he liked nlohmann/json because it had the most forks. I looked into how to implement it inside of his code and saw I only needed to include the HPP file inside of the code.

What was done to my SSG

Issue

Pull Request

Once Tong implemented JSON inside of my Python SSG I used a git remote to test his repo. I Tested and looked over the code and felt the changes done to mine were done well so I pushed it to my main.

Top comments (0)