Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

API Issue: Creating Issues with Special Characters in Description via REST API

Nick
December 11, 2025

Hi Jira Community,

I'm new to coding, but have worked on using iPasS platforms to automate and integrate systems.  I'm also somewhat new to Jira.

I'm creating Jira tasks via the REST API v3 (/rest/api/3/issue) using Atlassian Document Format (ADF) for descriptions. Task creation works fine for most content, but fails with a JSON parsing error when the description contains certain special characters.

Working example: Simple text descriptions create successfully.

Failing example: Descriptions containing these special characters cause 400 errors: ~ / % & @ # ' ' " ;

Current ADF structure:

json
"description": {  "type": "doc",  "version": 1,  "content": [    {      "type": "paragraph",      "content": [        {          "type": "text",          "text": "Lorem Ipsum text with ~ / % & @ # ' ' \" ; characters"        }      ]    }  ]}

What I've tried:

  • Escaping double quotes: \"\"
  • Escaping backslashes: \\\
  • Replacing special characters with alternatives
  • Using escapeHTML() functions before sending
  • Replacing newlines with \n or spaces

Question: What's the proper way to sanitize or encode text content with special characters for ADF text nodes? Is there a recommended encoding method or list of characters that must be escaped/removed?

Any guidance appreciated!
Thanks,
Nick

2 answers

1 accepted

5 votes
Answer accepted
Kai Becker
Community Champion
December 11, 2025

Hi @Nick 

there is an easy fix for that. You can simply use the jsonEncode() function. It will escape the content as needed.
You could also put your content from the description into a variable (declared before the post) and then go with

{{variableName.jsonEncode()}}

in your webrequest action. 

 

Please checkout https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#jsonEncode-- for further information.

0 votes
Nick
December 11, 2025

Thanks, @Kai Becker !

Turns out Adobe Workfront Fusion modules don't have the jsonEncode() function available.  However, you did lead me down the correct path with regard to using Fusion's available encoding functions which ended up solving the issue.

Much appreciated.

Kai Becker
Community Champion
December 11, 2025

glad I pointed you in the right direction :)

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