MCPcopy Create free account
hub / github.com/Bleemsys/Artisan-Core / update_treeview_from_json

Method update_treeview_from_json

AGUI/JSONtreeview.py:309–318  ·  view source on GitHub ↗

Updates the treeview from JSON in the text widget

(self, text_widget)

Source from the content-addressed store, hash-verified

307 pass
308
309 def update_treeview_from_json(self, text_widget):
310 """Updates the treeview from JSON in the text widget"""
311 try:
312 json_content = text_widget.get("1.0", tk.END)
313 parsed_json = json.loads(json_content)
314 self.data = parsed_json
315 self.clear_all()
316 self.insert_json('', parsed_json)
317 except json.JSONDecodeError:
318 tk.messagebox.showerror("Error", "Invalid JSON format")
319
320 def Save_File(self):
321 self.update_treeview_from_json(self.text_widget)

Callers 2

Save_FileMethod · 0.95

Calls 3

clear_allMethod · 0.95
insert_jsonMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected