Thank you for taking your time to review my code. Yes, it is a beginner's project :D
1) How do I format the JSON for readability or should I ignore that?
2) Thanks for that. Didn't know about it. Any ideas on how I can fix that? Maybe I can check if it is a file and not a directory and ask for input again for y/n?