Hi I'm having problems with trying to replace \u2028 and \u2029 in JSON response using UpdateAttribute processor.
Without replacing this my next processor, ReplaceText , truncates the JSON causing it to become invalid.
Can someone help?
It would be lot more easier to have script that can go through the json message (or) attribute values and look for \u2028 character and replace with "".
Sample groovy script to replace the "\u2028"
def st = ' '; println st.replace("\u2028", "hi") Output: hi
Like this way you can have the Groovy/python ..etc script and use ExecuteGroovyScript/ExecuteScript/InvokeScriptedProcessors to execute the script.
For more reference regarding scripting in nifi refer to this link.