travisneeley commented on a change in pull request #3576: NIFI-6417
Configurable Jolt Transform Charsets
URL: https://github.com/apache/nifi/pull/3576#discussion_r303169909
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/JoltTransformJSON.java
##########
@@ -332,12 +360,15 @@ public void setup(final ProcessContext context) {
} catch (final Exception ex) {
getLogger().error("Unable to setup processor", ex);
}
+
+ inputCharset =
Charset.forName(context.getProperty(INPUT_CHARSET).getValue());
+ outputCharset =
Charset.forName(context.getProperty(OUTPUT_CHARSET).getValue());
}
private JoltTransform createTransform(final ProcessContext context, final
String specString) throws Exception {
final Object specJson;
if (context.getProperty(JOLT_SPEC).isSet() &&
!SORTR.getValue().equals(context.getProperty(JOLT_TRANSFORM).getValue())) {
- specJson = JsonUtils.jsonToObject(specString, DEFAULT_CHARSET);
+ specJson = JsonUtils.jsonToObject(specString, inputCharset.name());
Review comment:
Hmm I have no idea how to fix that. I have no experience in fixing custom UI
pieces in NiFi as I've actively avoided them since I started working with the
framework.
Will the Advanced UI respect the processor setting?
----------------------------------------------------------------
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