MetaGPT_AI / check_json.py
Bob-Potato's picture
Create check_json.py
255c53e verified
raw
history blame contribute delete
378 Bytes
import os
import json
JSON_FILE = "articles.json"
print("WORKDIR:", os.getcwd())
print("Files:", os.listdir("."))
print("Exists articles.json?", os.path.exists(JSON_FILE))
try:
with open(JSON_FILE, "r", encoding="utf-8") as f:
data = json.load(f)
print("JSON loaded successfully, items:", len(data))
except Exception as e:
print("Error loading JSON:", e)