Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,048
Community Members
 
Community Events
168
Community Groups

How can I avoid unintended conversions when using the REST API to register a description of an ISSUE

When using the JIRA REST API to register a description of an issue, \(two backslashes) may or may not be converted to a newline. (See pattern below).
Can you please tell me what kind of pattern is used to convert them to newlines and how to prevent them from being converted to newlines?
 
・If ”\\/” is set, the description is registered in the state of ”\\/”.
・If ”\\n” is set, the description is registered in the state of ”\\n”.
・If ”\\r” is set, the description is registered in the state of ”\\r”.
・If ”\\uXXXX” is set, the description is registered in the state of ”\\uXXXX”.
・If ”\b” is set, Description is registered in the state of line feed and b.
・If ”\t” is set, Description is registered in the state of line feed and t.
・If ”\f” is set, Description is registered in the state of line feed and f.

1 answer

1 accepted

0 votes
Answer accepted

Hi @Hideyuki Tashiro

welcome to the Atlassian Community.

Can you let us know which programming language/tool you are using to perform the REST requests? As long as your programming language properly escapes the content, you shouldn't need to worry about this.

Cheers,
Matthias.

Thank you very much for your reply.
The programming language is python.

Oh, while searching for some information, I've stumbled across this article which mentions some reserved characters which actually might be your problem:

The following characters are reserved characters and can not be used in JSON and must be properly escaped to be used in strings.

  • Backspace to be replaced with \b

  • Form feed to be replaced with \f

  • Newline to be replaced with \n

  • Carriage return to be replaced with \r

  • Tab to be replaced with \t

  • Double quote to be replaced with \"

  • Backslash to be replaced with \\

Thank you very much. I understood very well.

Like Matthias Gaiser _K15t_ likes this

Fyi: If this answer solved your problem, it's best to accept the answer so that other users can find it easily in the future.

Suggest an answer

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

Atlassian Community Events