Forums

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

How do I incorporate a textarea field with hard carriage returns into my JSON payload?

Wende Wilson
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!
August 2, 2026

 

Hello,

I am using a ConfiForms TextArea field and creating a JSON payload that is sent to Jira.

Whenever a user enters a hard return (newline) in the TextArea field, the JSON generation fails with an error similar to:

 

Could not prepare JSON...
Unterminated string

 For example, if the TextArea contains:

 

A
B

 the JSON payload breaks unless I manually replace the line breaks.

Error looks like (note replaced middle of code with ....
"description": "Request: A B\n\n...\nIssue Link: XXXXX-1" Invalid format. Unterminated string at 698 [character 0 line 36]


My question is:

What is the supported ConfiForms syntax to escape or encode CR/LF characters from a TextArea field before inserting the value into a JSON payload?

Is there a better way to do this?

I am looking for the recommended approach to handle multiline TextArea content safely when building JSON in ConfiForms.

Thank you.

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
August 2, 2026

Hi @Wende Wilson 

Use escapeJSON function

Something like this

"description": "[entry.myTextAreaField.escapeJSON]",

Alex

Wende Wilson
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!
August 4, 2026

Good morning @Alex Medved _ConfiForms_ 

Thank you so much for your help! I came across a similar recommendation while researching the issue and had seen your earlier response, but I could not get it to work on my first, second, and third tries.

I appreciate you helping me get past this roadblock.

Thank you so much!

Wende



Alex Medved _ConfiForms_
Community Champion
August 4, 2026

No problem, happy to help

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events