How can I add JSON highlighting to the code in Jira comment?

Finkelson picture Finkelson · Nov 10, 2015 · Viewed 50.3k times · Source

Is it possible to add a highlighted code to Jira comment? I want to write something like this:


The comment text and JSON doc:

{
  "key": 100
}

I've found only one example:

{code:javascript}
{
  "key": 100
}
{code}

But it does not really highlight my code. I see only the grey block.

Answer

Niwrad picture Niwrad · Jul 13, 2017

You can try to add only {code} at the beginning and end of your code block.

Example:

{code}
{
  "key": 100
}
{code}