# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
+try:
+ import json
+except ImportError:
+ import simplejson as json
- json = simplejson.load(jsonfile)
+ jsondata = json.load(jsonfile)
except ValueError, err:
print "%s is malformed: %s" % (filename, err)
sys.exit(1)
finally:
jsonfile.close()
except ValueError, err:
print "%s is malformed: %s" % (filename, err)
sys.exit(1)
finally:
jsonfile.close()
def main():
if len(sys.argv) != 3:
def main():
if len(sys.argv) != 3: