Nifi :usign replace text for replacing '},' with '\n'

Nifi :usign replace text for replacing '},' with '\n'

我有 json 这样的回复:

{"ID":"1","AddressType":"1"},{"ID":"2","AddressType":"1"},{"ID":"3","AddressType":"1"}]

我想将其转换成这种格式:

{"ID":"1","AddressType":"1"}
{"ID":"2","AddressType":"1"}
{"ID":"3","AddressType":"1"}]

如何在替换文本处理器中用新行替换 { 之后的命令?

试试这个:

搜索值:\},\{

替换:}${literal('\n')}{


其中 ${literal('\n')} 只是一个新行 '\n'