The goal was to export all of the passwords stored using pass to JSON format.
Warning
May contain bugs. This code was written with a focus on the result, and it worked for me.
Why did I focus on the result and not worry about other cases? Because when I wrote this, I just wanted to get the job done.