code: def is_json(mimetype):
      
      if not mimetype:
          return False
      if ";" in mimetype:  # Allow Content-Type header to be passed
          mimetype = get_mimetype(mimetype)
      if mimetype == "application/json":
          return True
      if mimetype.startswith("application/") and mimetype.endswith("+json"):
          return True
      return False
docs: Indicates if this mimetype is JSON or not.  By default a request
      is considered to include JSON data if the mimetype is
      ``application/json`` or ``application/*+json``.