first commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
import json
|
||||
|
||||
d = json.load(open(r"C:\Users\Idiot\Desktop\temp\sample.json", "r", encoding="utf-8"))
|
||||
print("Top keys:", list(d.keys()))
|
||||
print("Data type:", type(d.get("Data")))
|
||||
|
||||
data_val = d.get("Data")
|
||||
if isinstance(data_val, str):
|
||||
print("Data is a string, trying to parse...")
|
||||
parsed = json.loads(data_val)
|
||||
print("Parsed Data keys:", list(parsed.keys()))
|
||||
elif isinstance(data_val, dict):
|
||||
print("Data keys:", list(data_val.keys()))
|
||||
print("prism_tablesInfo exists:", "prism_tablesInfo" in data_val)
|
||||
Reference in New Issue
Block a user