MCPcopy
hub / github.com/DedSecInside/TorBot / saveJSON

Method saveJSON

torbot/modules/linktree.py:90–97  ·  view source on GitHub ↗

Saves the tree to the current working directory under the given file name in JSON.

(self)

Source from the content-addressed store, hash-verified

88 self.save2file(f'{file_name}.txt')
89
90 def saveJSON(self) -> None:
91 """
92 Saves the tree to the current working directory under the given file name in JSON.
93 """
94 json_data = self._to_json()
95 file_name = self._get_tree_file_name()
96 with open(f'{file_name}.json', 'w+') as f:
97 f.write(json_data)
98
99 def _to_json(self) -> str:
100 json_data = self.to_json()

Callers 1

runFunction · 0.95

Calls 2

_to_jsonMethod · 0.95
_get_tree_file_nameMethod · 0.95

Tested by

no test coverage detected