Using a sequence of GenerateTableFetch, ExecuteSQL, SplitAvro, and ConvertAvroToJSON processors, I am fetching a JSON field from a MySql view that has this content:
"A 7-point scale (1=\u201Cnot at all\u201D to 7=\u201Cextremely\u201D) is used.."
If I view the content of the file in a queue and chose option formatted (as opposed to original), I get this:
"A 7-point scale (1=“not at all” to 7=“extremely”) is used..."
And this unescaped string is what I would like to store in a NoSQL db. Is this in-built NIFI viewer using a function that I can tap into?
I am asking this because later in the flow, I wrap the JSON within an xml tag in order to transform it to XML using an XSLT stylesheet. But I end up with the unicode characters after the transformation and would like to retrieve back the original unescaped JSON (before I store it in the NoSQL db).
\u201Cis a json-encoded character in a string that represents“. so json formatted nifi-viewer decodes it to display.\u201Cis showing in the NoSQL content...I am using the XSLT transform from stackoverflow.com/questions/13007280/… (the one that supports null) and I suspect it is converting the unicode sequence to a literal string with characters \u201C, otherwise the NoSQL db would have been able to unescape it properly