Is there a difference between
object = {1:"one", 2:"two", 3:"three"}
file.write(json.dumps(object))
and json.dump(object). If no, which one should I use? Which one is best practices? I heard they do the same thing and wants to use the first one over the latter in my code. I'm using this to write to a JSON file.