def check_is_alert_policy_json()

in scripts/alerts/validate_alerts_format.py [0:0]


def check_is_alert_policy_json(path):
  with open(path) as f:
    try:
      policy_json = json.dumps(json.load(f))
    except:
      raise Exception("{} content could not be loaded".format(path))
    monitoring_v3.AlertPolicy.from_json(policy_json)