docs: def validate_json(data: str):
      """ Validate JSON by parsing string data. Returns the json dict. """
      result = None
      try:
          result = json.loads(data)
      except ValueError as error:
          log(ERROR, "invalid json: %s", error)
  
      return result