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
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

461 views 7 5
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