Handling ConvertFrom-Json in PowerShell
We found a way to partially solve the problem for slashes as follows:
$SRDesc1_Prep = $SR.Description1
$SRDesc1_formatted = $SRDesc1_prep -replace '\\','\\'
$UserResponses = ConvertFrom-Json $SRDesc1_formatted
However, the Orchestrator Runbook still fails if someone enters a double quote into the description field:
I can't find a good way around it since the PowerShell would need to look inside of the double quotes for another single quote. I was wondering if anyone had encountered a similar issue or knows of a better way to handle this?