def parseMessage(self, msg):
print(msg)
try:
decoded = json.loads(msg)
except json.JSONDecodeError:
return
type = decoded["msgtype"]
if type == "control":
self.handleControl(decoded)
elif type == "sheetdelta":
self.passSheetDelta(decoded)
elif type == "request":
self.handleRequest(decoded)
elif type == "nodedata":
self.passNodedata(decoded)
评论列表
文章目录