import json, os, time, collections

P = '/Users/liuxinyuan/Desktop/Hermes输出-工作类/数据/mcp_customers.json'
d = json.load(open(P, encoding='utf-8'))
print('top keys:', list(d.keys()))
print('updated_at =', d.get('updated_at') or d.get('updated'), '| total =', d.get('total'))
cs = d.get('customers') or []
print('n =', len(cs), '| size %.1f MB' % (os.path.getsize(P) / 1024.0 / 1024.0),
      '| mtime', time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(os.path.getmtime(P))))
print('item keys:', list(cs[0].keys()))
print('sample:', json.dumps(cs[0], ensure_ascii=False)[:400])
names = [c.get('name') for c in cs]
print('unique names:', len(set(names)), '| empty names:', sum(1 for x in names if not x))
ow = [c.get('owner') for c in cs]
print('owner 非空:', sum(1 for x in ow if x and (x.get('email') or x.get('name_cn'))))
print('created_at 非空:', sum(1 for c in cs if c.get('created_at')))
