'How to batch convert .mid files to .json as this website does?

I want to batch convert mid files to json exactly as this web does: https://www.visipiano.com/midi-to-json-converter/.

But now I have to manually convert every mid file to json using the website one by one which requires a lot of time. I really need to automate this some way, if someone has any idea how to do it please tell me.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source