VortexCommerceBackend / compare_jsons.py
hisham-cmd's picture
Optimized Sync: Differential Upload & Performance Tweak
60470bc
Raw
History Blame Contribute Delete
527 Bytes
import json
import os
files = [
r'c:\react_projects\VortexCommerce\kaggle\extra_products_vortex.json',
r'c:\react_projects\VortexCommerce\backend\kaggle\extra_products_vortex.json'
]
for f_path in files:
if os.path.exists(f_path):
with open(f_path, "r", encoding="utf-8") as f:
data = json.load(f)
count = len(data["products"]) if isinstance(data, dict) and "products" in data else len(data)
print(f"{f_path}: {count} products")
else:
print(f"{f_path}: NOT FOUND")