I'm trying to make this code work but I can't figure it out
Me and my teacher tried to figure it out but we don't understand why it doesn't work.
When you put in a username in that is already taken it will just add it to the json file again.
Well first off, you some some issues with your file system, JSON converts python dictionaries to a string so you can put them in a text file, although I've never tried it with actual
.json files I don't see why it wouldn't work. I think the issue is on line 7, where you tell it to jsonify f, when it should be to jsonify the value of f, try changing that line to
users = json.load(f.read()) and let me know if it works.