Workflow Webservice: JSON | XM Community
Skip to main content

Hi,

 

we would like to POST a JSON Array with dynamic values via Webservice task. The value should look like 

 "u_external_attachment": :"https://clientexample.com/jfe/file/F_2SvQJLJSDGhLWgG", "https://clientexample.com/jfe/file/F_AbLRHqXLqUGqW3f", "https://clientexample.com/jfe/file/F_3I0ITNq5Gr1Wveo"]

Qualtrics encloses the value part with quotation marks and masks the existing quotation marks with \. In the data (data & analyses) we see the value as we expect it. But in the JSON output of the webservice we see it like this: 

"u_external_attachment": ":\"https://clientexample.com/jfe/file/F_2SvQJLJSDGhLWgG\", \"https://clientexample.com/jfe/file/F_AbLRHqXLqUGqW3f\", \"https://clientexample.com/jfe/file/F_3I0ITNq5Gr1Wveo\"]",

What can I do to prevent Qualtrics from masking my data. Any help is appreciated.

Thanks,

Gerlinde 

would suggest to use single quotation instead of double, like below.

'u_external_attachment': ['https://clientexample.com/jfe/file/F_2SvQJLJSDGhLWgG', 'https://clientexample.com/jfe/file/F_AbLRHqXLqUGqW3f', 'https://clientexample.com/jfe/file/F_3I0ITNq5Gr1Wveo']

Hi Imran,

thank you, that’s a good idea. I tested it and it looks better in the JSON output. We already have the quotation marks at the beginning and at the end, but not in between, see Example.

But unfortunately the task itself failed because of this change.

"u_external_attachment": " 'https://clientexample.com/jfe/file/F_tYba0E79WZbCbXH', 'https://clientexample.com/jfe/file/F_4SjoEamK1rxUMmZ', 'https://clientexample.com/jfe/file/F_3kqfkXgeBQRRB6m']",

Any other ideas to solve that problem?

Thanks,

Gerlinde

 

 


Hi @Gerlinde_Harms_Kantar ,

Qtip: Plain Text can only be specified as Free text. When using the JSON Free text option, inputs are not escaped. This means that, for example, a piped text input containing double quotes or newline characters (example: \n) will cause the JSON body to become invalid and not run properly. An alternative to this is to use either the key-value pairs option or use a code task to clean or escape the text to be injected into the web service task.


Leave a Reply