逻辑应用程序:如何在 JSON 变量中添加根节点?
Logic apps: How to add root node in JSON variable?
我正在尝试执行以下操作:
@xml(json(concat('\"rootnode\":',variables('TestJSON'))))
但是我得到的错误是:
InvalidTemplate. Unable to process template language expressions in
action 'Set_XXXXXXX' inputs at line '1' and column '1873': 'The
template language function 'json' parameter is not valid. The provided
value '\"rootnode\":.......... cannot be parsed: 'Unexpected
character encountered while parsing value: \. Path '', line 0,
position 0.'.
看起来转义字符在逻辑应用程序中不起作用?有什么建议吗?
请使用这个表达式:
xml(json(concat('{"rootnode":',variables('TestJSON'), '}')))
我正在尝试执行以下操作:
@xml(json(concat('\"rootnode\":',variables('TestJSON'))))
但是我得到的错误是:
InvalidTemplate. Unable to process template language expressions in action 'Set_XXXXXXX' inputs at line '1' and column '1873': 'The template language function 'json' parameter is not valid. The provided value '\"rootnode\":.......... cannot be parsed: 'Unexpected character encountered while parsing value: \. Path '', line 0, position 0.'.
看起来转义字符在逻辑应用程序中不起作用?有什么建议吗?
请使用这个表达式:
xml(json(concat('{"rootnode":',variables('TestJSON'), '}')))