[
https://issues.apache.org/jira/browse/NIFI-5261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500610#comment-16500610
]
ASF GitHub Bot commented on NIFI-5261:
--------------------------------------
Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2758#discussion_r192825698
--- Diff:
nifi-commons/nifi-utils/src/test/java/org/apache/nifi/util/validator/TestStandardValidators.java
---
@@ -288,4 +288,42 @@ public void testiso8061InstantValidator() {
vr = val.validate("foo", "2016-01-01T01:01:01.000Z", vc);
assertTrue(vr.isValid());
}
+
--- End diff --
This would be a great use case for Groovy instead of Java. I've started
doing that with my unit tests because you can specify the JSON like this:
```
import static groovy.json.JsonOutput.*
def json = prettyPrint(toJson([
Name: "Crockford, Douglas"
]))
```
Not required, but worth thinking about because it's a lot cleaner and
Groovy is allowed in tests.
> Create a JSON validator
> -----------------------
>
> Key: NIFI-5261
> URL: https://issues.apache.org/jira/browse/NIFI-5261
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Extensions
> Reporter: Sivaprasanna Sethuraman
> Assignee: Sivaprasanna Sethuraman
> Priority: Minor
>
> Create a StandardValidator that validates PropertyDescriptors that take a
> JSON input.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)