nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-1893) Add processor for validating JSON
Date Tue, 20 Sep 2016 16:26:20 GMT

    [ https://issues.apache.org/jira/browse/NIFI-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507030#comment-15507030
] 

ASF GitHub Bot commented on NIFI-1893:
--------------------------------------

GitHub user bartoszjkwozniak opened a pull request:

    https://github.com/apache/nifi/pull/1037

    NIFI-1893 Add processor for validating JSON

    Signed-off-by: Bartosz Wozniak <bartosz.jk.wozniak@gmail.com>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bartoszjkwozniak/nifi NIFI-1893

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1037.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1037
    
----
commit 554d15fa994b74db67e2906de31a8fe001045d95
Author: Bartosz Wozniak <bartosz.jk.wozniak@gmail.com>
Date:   2016-09-19T11:37:54Z

    NIFI-1893 Add processor for validating JSON
    
    Signed-off-by: Bartosz Wozniak <bartosz.jk.wozniak@gmail.com>

----


> 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)

Mime
View raw message