Danny02 commented on code in PR #1919:
URL: https://github.com/apache/avro/pull/1919#discussion_r1000516672
##########
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:
Just was able to take a look at your PR. It looks like a even better
solution, because it "fixes" the problem on a lower level.
Would you say that this PR is now obsolete?
--
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]