How to update description in jira using rest api

hi all,

am successfully to updated single line description to jira with below json format

{

"update":{

"description":[{"set":"SUBJECT:xxxxxxxxxxxxxxxxx"}]

}}

but now am tring to update multile line desctription to jira with using below json fromat ,

{

"update":{

"description":[{"set":"SUBJECT:xxxxxxxxxxxxxxxxxxxxxx
ZD ID #:xxxxxxxxxxxxxx
REPORTING AGENT: xxxxxxxxxxxxxxxxxx
CONTACT:
COMPANY:
LOGIN URL:
ACCOUNT NAME WITH SUB-ACCOUNT:
EVENT NAME:
EVENT DATE:
FIX NEEDED BY:
BROWSER REPRODUCED IN:
ISSUE SUMMARY:
STEPS TO REPRODUCE:ZendeskAttachmentName:AppScreenShot2.pngZendeskAttachmentURL:https://xxxxxxx/attachments/token/gjYk5p6SKP6StfT817wvAZ99I/?name=AppScreenShot2.png"}]}}

am getting following error

{"errorMessages":["Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value\n at [Source: org.apache.catalina.connector.CoyoteInputStream@5e7e1d1d; line: 1, column: 83]"]}￿
Severity: Error

please let me know where am doing wrong in json format.

Regards,

Srinivas reddy

1 answer

Remove the new lines and replace them with '\n' and it should work

http://stackoverflow.com/questions/2392766/multiline-strings-in-json

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,968 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot