Writes object instance in JSON formatted String to file
    
    :param file: File to write JSON string ot
    :param data: Object to convert to JSON 
    :param pretty: Use pretty formatting or not

def to_json_file(file, data, pretty):
    """
    Writes object instance in JSON formatted String to file
    
    :param file: File to write JSON string ot
    :param data: Object to convert to JSON 
    :param pretty: Use pretty formatting or not
    """
    json_string = to_json(data, pretty)
    file_utils.write_to_file(file, json_string)