先上代码. jsondiff.py #!/usr/bin/python #_*_encoding:utf-8_*_ import argparse import json import sys reload(sys) sys.setdefaultencoding('utf-8') def parseArgs(): description = 'This program is used to output the differences of keys of two json data.' par…