import json def read_json(file_path): try: with open(file_path, "r") as file: data = json.load(file) return data except FileNotFoundError: print(f"Plik {file_path} nie został znaleziony.") except json.JSONDecodeError: print(f"Nie można odczytać pliku {file_path} jako JSON.") # Przykład użycia: data = read_json("path/to/your/json/file.json") print(data)