escaping quotes for Smart Values?

Alex Shroyer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2025

I'm trying to send a web request containing fields like {{issue.summary}} but when the customer types a double quote, the request fails with "invalid json".

It appears that the quote is inserted (without escaping) into the json of the web request. Is there any way to safely use issue.summary in a web request?

2 answers

1 accepted

2 votes
Answer accepted
Alex Shroyer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2025

.asJsonString fails in the same way but that was a good hint - .jsonEncode works perfectly for my use case. Thanks!

3 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2025

Hi @Alex Shroyer ,

welcome to the Atlassian Community.

Please see here and try: 

asJsonString

{{issue.summary.asJsonString}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events