load json as string from file in python code example Example: python json dump to file import json with open('data.json', 'w') as f: json.dump(data, f)