python实现 js json.stringfy()

import hashlib

data = {"pageId": "b026785c5043851a5dfc0ae65a4749c5"}
name = '"{}"'.format(str(data))
print(name)

e4081212402c47f6034fe5cb0b2b8e58

print(hashlib.md5(name.encode(encoding='utf-8')).hexdigest())

你可能感兴趣的:(python实现 js json.stringfy())