How do you send numbers from piped text through a JSON web service call? | XM Community
Question

How do you send numbers from piped text through a JSON web service call?

  • 22 February 2021
  • 1 reply
  • 25 views

As far as I can find, you can't send numbers from piped text through a JSON web service call. Piped text always gets quoted which, well, is not the JSON format for numbers. This is hugely irritating and a blocker to the feature. For example, hit the httpbin.org test site to see what gets sent in the request body:
screenshot.Qualtrics web service number testing.pngSet the question in Block 1 to show the results in ${e://Field/data}. This is what you get:

{"age1":11,"age2":"22","age3":"33","age4":"444"}

As you can see, only 11 was sent as a number. Everything from piped text was quoted and will fail with APIs expecting a number. Setting the type to JSON doesn't help. Even trying to use $e{} to fake it out doesn't help.
So, if there's some other trick here, I haven't found it.
The help page here is absolutely horrible and misleading, and doesn't even address the various JSON data types:
Web Service"Attention: Every key and value in a JSON object, as well as every element in a JSON array (including piped text), must have double quotes around it."
That's absurd. Has anyone at Qualtrics even looked at the JSON spec???


1 reply

Badge +48

Hi juanitogan! If you have not yet already, we’d recommend posting this in our Product Ideas category, as it is a feature not already developed by our team. If you’re not sure how to post your idea, check out our Ideation Guidelines and our Policy & Procedures.

Leave a Reply