Exemple #1
0
def _matches_format(path_or_file):
    if isinstance(path_or_file, str):
        path_or_file = open(path_or_file)

    try:
        json.load(path_or_file)
        return True
    except:
        return False
Exemple #2
0
def _matches_format(path_or_file):
    if isinstance(path_or_file, str):
        path_or_file = open(path_or_file)

    try:
        json.load(path_or_file)
        return True
    except:
        return False
Exemple #3
0
def _load_format(path_or_file):
    if isinstance(path_or_file, str):
        path_or_file = open(path_or_file)
    
    return json.load(path_or_file)
Exemple #4
0
def _load_format(path_or_file):
    if isinstance(path_or_file, str):
        path_or_file = open(path_or_file)

    return json.load(path_or_file)