YolandaMDavis commented on a change in pull request #3576: NIFI-6417 
Configurable Jolt Transform Charsets
URL: https://github.com/apache/nifi/pull/3576#discussion_r303707858
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JoltTransformJSON.java
 ##########
 @@ -266,7 +294,7 @@ public void onTrigger(final ProcessContext context, 
ProcessSession session) thro
         try (final InputStream in = session.read(original)) {
             inputJson = JsonUtils.jsonToObject(in);
 
 Review comment:
   @travisneeley I had a chat with @mattyb149 offline and he confirmed the 
intent was to apply changes for incoming json.  Given JsonUtils.jsonToObject 
method doesn't support passing both InputStream and encoding or even allow a 
reader, it may be reasonable to use a ReaderInputStream (see 
https://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/input/ReaderInputStream.html).
   
   It does makes sense to also apply to the specification, since 
transformations can potentially add characters to the result or to simply match 
content. The same property for the input charset can be applied to both (we 
can't see a case where a separate charset would be needed for the spec).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to