code: def load_json(filename):
      
      try:
          if PY2:
              args = 'rb'
          else:
              args = 'r'
          with open(filename, args) as fid:
              data = json.load(fid)
          return data, None
      except Exception as err:
          return None, str(err)
docs: Load a json file as a dictionary