This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhuyujia-webhopper/analyzer/file_loader.py
little_stone bd2d50cf35 code update
2022-05-05 20:41:28 +08:00

22 lines
394 B
Python

import os
import json
class Loader:
def __init__(self):
self.PATH = "../jsonfiles/"
@staticmethod
def readGraph(filename):
f = open(filename, 'r')
graph = json.load(f)
f.close()
return graph
def dumpFile(self, filename, service):
f = open(self.PATH + filename, "w")
json.dump(service, f, indent=2)
f.close()