Öffnen Sie die JSON -Datei im aktuellen Verzeichnis Python

import os
script_dir = os.path.dirname(__file__)
file_path = os.path.join(script_dir, 'relative/path/to/file.json')
with open(file_path, 'r') as fi:
    pass
Energetic Earthworm