コード例 #1
0
ファイル: JSONFormat.py プロジェクト: BillSeurer/lnt
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
コード例 #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
コード例 #3
0
ファイル: JSONFormat.py プロジェクト: BillSeurer/lnt
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)
コード例 #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)