(self, parent, json_dict)
| 72 | widget.bind("<Leave>", lambda _: tooltip.hide_tip()) |
| 73 | |
| 74 | def insert_json(self, parent, json_dict): |
| 75 | for key, value in json_dict.items(): |
| 76 | if isinstance(value, dict): |
| 77 | # Insert dictionary nodes recursively |
| 78 | node = self.tree.insert(parent, 'end', text=key, values=[{}]) |
| 79 | self.insert_json(node, value) |
| 80 | elif isinstance(value, list): |
| 81 | # Insert lists directly without further filtering |
| 82 | node = self.tree.insert(parent, 'end', text=key, values=[json.dumps(value)]) |
| 83 | elif isinstance(value, (int, float, bool)): |
| 84 | # Insert numbers and booleans directly |
| 85 | self.tree.insert(parent, 'end', text=key, values=[value]) |
| 86 | else: |
| 87 | # Insert strings directly |
| 88 | self.tree.insert(parent, 'end', text=key, values=[value]) |
| 89 | |
| 90 | def item_clicked(self, event): |
| 91 | item_id = self.tree.focus() |
no outgoing calls
no test coverage detected