def decode_json(self):
"""
Decode the message and convert to a standard JSON dictionary.
:returns: a string that contains the converted JSON document.
"""
if not self.decoded_json_cache:
cls = self.__class__
d = self.decode()
try:
import xmltodict
if "Msg" in d:
d["Msg"] = xmltodict.parse(d["Msg"])
except ImportError:
pass
self.decoded_json_cache = json.dumps(d, cls=SuperEncoder)
return self.decoded_json_cache
dm_log_packet.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录