Here I have a dict,
dict1 = {'name':"max","age":20}
What I want to do is to save the dict into a json file.
@bp_main.route('/download/json', methods=['GET'])
def get_sample_json_file():
dict1 = {'name':"max","age":20}
return ???
What I did now, is to save dict1 into a real json file, and use flask send_from_directory to return the file. How to avoid saving dict1 into disk?