This is the code block that is failing when I call CreateOrUpdateAsync. The Logic App runs just fine in Azure, but when I try to create it using the .NET SDK I get JSON parsing issues.
'foreach': '@variables(""LocationData"")',
'runAfter': {
'Initialize_variable_2': [
'Succeeded'
]
}
Here is the error message.
{"The template validation failed: 'The template action 'For_each' at line '1' and column '263' is not valid: \"The template language expression 'variables(\"LocationData\")' is not valid: the string character '\"' at position '10' is not expected.\".'."}
If I change to single quote, I get this error.
'foreach': '@variables('LocationData')',
'runAfter': {
'Initialize_variable_2': [
'Succeeded'
]
}
{"After parsing a value an unexpected character was encountered: L. Path 'actions.For_each.foreach', line 651, position 40."}
This JSON formatter & validator doesn't like it either.
https://jsonformatter.curiousconcept.com/
Does anyone know the problem and how to fix it?
Any help is much appreciated! Thanks!