Skip to content

NIFI-15716 Added JSON Lines Support to ValidateJson.#11012

Open
dan-s1 wants to merge 6 commits intoapache:mainfrom
dan-s1:NIFI-15716
Open

NIFI-15716 Added JSON Lines Support to ValidateJson.#11012
dan-s1 wants to merge 6 commits intoapache:mainfrom
dan-s1:NIFI-15716

Conversation

@dan-s1
Copy link
Contributor

@dan-s1 dan-s1 commented Mar 16, 2026

Summary

NIFI-15716
The following PR introduces support for JSON Lines or NDJSON in the ValidateJson processor. The initial approach is to validate each object and fail fast on the first object which is invalid. The emitted warning message indicates which line has the invalid JSON object. I would like clarification if the line number should also be added to the FlowFile attribute json.validation.errors that is added to hold the validation error messages.
In addition to aforementioned feature, Intellij warnings were fixed and in one unit test the use of Jupitor Arguments.argumentSet replaced the use of Arguments.arguments

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this support in ValidateJson @dan-s1. I think it would be helpful to include the line number in the FlowFile attribute, in answer to your question. I noted a handful of recommended adjustments.

@dan-s1 dan-s1 requested a review from exceptionfactory March 17, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants