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.