code: def __load_json(self, stream):
          
  
          import json
  
          try:
              return json.loads(stream)
          except ValueError as e:
              cause = "invalid json format. %s" % str(e)
          raise InvalidFormatError(cause=cause)
docs: Load json stream into a dict object