在我的流程中,我读取并运行 ( for-each ) 一个JSON 对象数组。我使用APPEND类型将每个对象插入到同一个文件中。
我想将每个存储JSON
为indent
false(JSON 一行)和一个carriage-return
像这样的例子:
{"hello:"world1"}
{"hello:"world2"}
{"hello:"world3"}
我用这个:
%dw 2.0
output application/json indent=false
---
payload ++ '\r'
但它返回一个关于无法将对象强制转换为字符串的错误。 我该如何解决这个问题?