+if __name__ == '__main__':
+ try:
+ #Read the input file and compare the two json (target->result)
+ jsonTarget = json.loads(sys.argv[1])
+ jsonResult = json.loads(sys.argv[2])
+ res1=compare_json(jsonTarget, jsonResult)
+
+ #Read the json again (in case the previous calls has re-arranged the jsons)
+ jsonTarget = json.loads(sys.argv[1])
+ jsonResult = json.loads(sys.argv[2])
+ #Compare the opposite order (result->target) to catch special duplicate json key cases
+ res2=compare_json(jsonResult, jsonTarget)
+
+ if (res1 and res2):
+ print (0)
+ else:
+ print (1)
+
+ except Exception:
+ print (1)
+ sys.exit()
\ No newline at end of file