I have a Run_Script Operator that is passing in a single parameter (Parameter 0).
The parameter is JSON text, which has been formatted with (extra) escape characters to work with cURL for Windows. Defined in PAM as follows:
Process.jsonStringWithSpaces = "{\\\"event\\\":{\\\"phrase\\\":\\\"thequickbrownfoxjumpedoverthelazydog\\\",\\\"phraseTwo\\\":\\\"the quick brown fox jumped over the lazy dog\\\"}}";
Debugged in PAM as follows:
{\"event\":{\"phrase\":\"thequickbrownfoxjumpedoverthelazydog\",\"phraseTwo\":\"the quick brown fox jumped over the lazy dog\"}}
When echoed out at the BAT file level:
echo %~1
I only see the following text:
{"event":{"phrase":"thequickbrownfoxjumpedoverthelazydog","phraseTwo":"the
So, two (2) things happened on the way from PAM to BAT:
- lost all of the slash characters (\)
- everything after the space ( ) got truncated
Can anyone tell me how to overcome these limitations when passing a string from PAM to a Windows BAT file?
[Note: Process Automation 4.3.100 SP01]