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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

81 views 0 5
Read article

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