SV: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-07-01 Thread Myklebust , Bjørn Magnar
Thanks, Andy. No, I’m sure there is no reason for that – it’s just that I’m fairly new to NiFi and don’t know it too well yet. Thanks, Bjørn Fra: Andy LoPresto Sendt: tirsdag 30. juni 2020 18:37 Til: users@nifi.apache.org Emne: Re: Replacing a base64-encoded field in a JSON-document with its

Re: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-06-30 Thread Andy LoPresto
You should not need to explicitly set the additional module directory to cover that location. Is there a reason you can’t use the native Groovy JSON [1] parsing? That way you don’t have to download any additional libraries. [1] http://groovy-lang.org/json.html#

Re: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-06-26 Thread Pierre Villard
Hi, I think that would be a perfect use case for NIFI-7572 [1] once there is a solution for it. [1] https://issues.apache.org/jira/browse/NIFI-7572 Le ven. 26 juin 2020 à 08:20, Myklebust, Bjørn Magnar < bjorn.mykleb...@skatteetaten.no> a écrit : > Ok, I see. > > Thanks, Andy. > > > > Bjørn >

SV: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-06-26 Thread Myklebust , Bjørn Magnar
Ok, I see. Thanks, Andy. Bjørn Fra: Andy LoPresto Sendt: torsdag 25. juni 2020 19:20 Til: users@nifi.apache.org Emne: Re: Replacing a base64-encoded field in a JSON-document with its decoded/converted value Hi Bjørn, No, XML to JSON conversion is not an Expression Language feature. You’ll

Re: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-06-25 Thread Andy LoPresto
Hi Bjørn, No, XML to JSON conversion is not an Expression Language feature. You’ll need to either get this data into a flowfile as the complete content to perform the conversion with existing built-in tools, or add that step to your Groovy script. With that additional requirement, I think

SV: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-06-25 Thread Myklebust , Bjørn Magnar
Thanks Andy. The XML-content is around 5 kB-ish. But I also need to convert the XML to JSON before replacing it back into the original JSON-file. Can this be done with e.g a ConvertAttribute before the ReplaceText? Thanks, Bjørn Fra: Andy LoPresto Sendt: onsdag 24. juni 2020 17:24 Til:

Re: Replacing a base64-encoded field in a JSON-document with its decoded/converted value

2020-06-24 Thread Andy LoPresto
Hello Bjørn, If the size of the encoded XML document is small (under ~1 KB), you can extract the Base64-encoded value to a flowfile attribute using EvaluateJSONPath, perform the decoding using the base64Decode Expression Language function [1], and then replace it into the flowfile JSON