[ 
https://issues.apache.org/jira/browse/NIFI-3303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17051594#comment-17051594
 ] 

Otto Fowler commented on NIFI-3303:
-----------------------------------


{code:bash}
--------------------------------------------------
Standard FlowFile Attributes
Key: 'entryDate'
        Value: 'Wed Mar 04 15:21:48 EST 2020'
Key: 'lineageStartDate'
        Value: 'Wed Mar 04 15:21:48 EST 2020'
Key: 'fileSize'
        Value: '32'
FlowFile Attribute Map Content
Key: 'filename'
        Value: 'f46ce8cb-00b5-4e25-9291-e729fd210c38'
Key: 'path'
        Value: './'
Key: 'uuid'
        Value: 'f46ce8cb-00b5-4e25-9291-e729fd210c38'
--------------------------------------------------
{"NO_PARENT":"{\"TEST\":\"A\"}"}

{code}

This is removing the double escapeJson() call.

The issue is, it breaks 14+ tests in the system with my fix.

I'll try to write up what is happening and get some comments for others, but 
like I said earlier, supporting regex, literals with symbols and EL at the same 
time, is really tough


> escapeJson in ReplaceText
> -------------------------
>
>                 Key: NIFI-3303
>                 URL: https://issues.apache.org/jira/browse/NIFI-3303
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: tianzk
>            Priority: Major
>         Attachments: ReplaceText_Bug.xml, config.png, dataflow.png
>
>
> I have some problems while using excapeJson and unescapeJson in ReplaceText 
> processor.
> When I give a string: He didn’t say, “Stop”!  to ReplaceText as input,and 
> configure ReplaceText like: attachment config.png
> The output of ReplaceText is same with the input: He didn’t say, “Stop!” 
> ,nothing changed.
> As described in NiFI Documentation the output should be: He didn’t say, 
> \"Stop!\”.Did I miss something?
> Also there are problems with unescapeJson.If input is: He didn’t say, 
> \”Sto\\\"p!\”,the return string will be: He didn’t say, ”Sto"p!”.
> My dataflow:(GetFile just read a file with a  string as content.)
> dataflow.png
> Thanks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to