[
https://issues.apache.org/jira/browse/NIFI-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15795375#comment-15795375
]
ASF GitHub Bot commented on NIFI-1893:
--------------------------------------
Github user basvank commented on the issue:
https://github.com/apache/nifi/pull/1037
@pvillard31 @mattyb149 thanks for the information, that didn't become clear
from this PR.
It seems to be possible to implement in an ASF-friendly way using
https://github.com/daveclayton/json-schema-validator (ASL 2.0), which depends
on https://github.com/FasterXML/jackson-core (Apache 2.0) instead of json.org.
I will see if I can find the time to do this myself, but if not it can
serve as a pointer for others.
> Add processor for validating JSON
> ---------------------------------
>
> Key: NIFI-1893
> URL: https://issues.apache.org/jira/browse/NIFI-1893
> Project: Apache NiFi
> Issue Type: New Feature
> Reporter: Matt Burgess
>
> NiFi has a ValidateXml processor to validate incoming XML files against a
> schema. It would be good to have one to validate JSON files as well.
> For example, an input JSON of:
> {
> name: "Test",
> timestamp: 1463499695,
> tags: {
> "host": "Test_1",
> "ip" : "1.1.1.1"
> },
> fields: {
> "cpu": 10.2,
> "load": 15.6
> }
> }
> Could be validated successfully against the following "schema":
> {
> "type": "object",
> "required": ["name", "tags", "timestamp", "fields"],
> "properties": {
> "name": {"type": "string"},
> "timestamp": {"type": "integer"},
> "tags": {"type": "object", "items": {"type": "string"}},
> "fields": { "type": "object"}
> }
> }
> There is at least one ASF-friendly library that could be used for
> implementation: https://github.com/everit-org/json-schema
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)