How to update description in jira using rest api

srinivas thippyreddy April 16, 2014

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

0 votes
Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2014

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