clesaec commented on code in PR #1919:
URL: https://github.com/apache/avro/pull/1919#discussion_r1000534983


##########
lang/java/avro/src/main/java/org/apache/avro/Schema.java:
##########
@@ -1619,6 +1619,16 @@ private static JsonNode validateDefault(String 
fieldName, Schema schema, JsonNod
     return defaultValue;
   }
 
+  /**
+   * Checks if a JSON value matches the schema.
+   *
+   * @param jsonValue a value to check against the schema
+   * @return true if the value is valid according to this schema
+   */
+  public boolean isValidValue(JsonNode jsonValue) {
+    return isValidDefault(this, jsonValue);
+  }

Review Comment:
   standard method => i would say "non static overridable method" (better for 
object programming).
   For 2 PR of 2 solution, I think we should discuss about that on the JIRA 
issue, i may missed some point (i want advice of other developer).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to