private static String getDetail(ValidationResult instanceResult, Map<String, ValidationResult> propertyResults) {
    if (instanceResult.isValid()) {
      for (Map.Entry<String, ValidationResult> entry : propertyResults.entrySet()) {
        ValidationResult propertyResult = entry.getValue();
        if (propertyResult != null && !propertyResult.isValid()) {
          return "The instance has invalid properties.";
        }
      }
    }
    return instanceResult.getDetail();
  }
Return this result as a JSON string.

@return this result in JSON format
ambari-server/src/main/java/org/apache/ambari/server/view/validation/InstanceValidationResultImpl.java