Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira automation pretty print a json string?

Zak Jacobson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2024

I have an automation that makes a web request and write the response as a comment. In case of errors, the response body is JSON and I'd like to pretty-print it.  I first tried surrounding in triple quotes, but it's just one long line.

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
March 8, 2024

Hi @Zak Jacobson -- Welcome to the Atlassian Community!

Does your response already have line breaks?  If so, you could try using the code snippet / markup for text fields:

{code:json}
your JSON expression here
{code}

https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=advanced

Kind regards,
Bill

Zak Jacobson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2024

Thanks Bill! I don't think there are line breaks... but I can change that!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events