Assume the input is YAML and convert to JSON

def to_json(template, clean_up=False):
    """
    Assume the input is YAML and convert to JSON
    """

    data = load_yaml(template)

    if clean_up:
        data = clean(data)

    return dump_json(data)