import json


def saveJSONFile(filepath, data):
    """ Saves JSON Data to File"""
    with open(filepath, 'w') as outfile:
        try:
            json.dump(data, outfile, indent=2)
        except ValueError as e:
            return False
        return True