jsonformattingjira

How to format text such as JSON that contains curly braces in Jira


I want to put some json within a Jira ticket, but when I highlight json (which is part of the spec), and chose format "Monospaced", it wraps the json in {{..}}, but the renderer does not render it as monospace - you just see the curly braces and the json rendered in normal font, like this:

{{{"foo" : "bar"}}}

but I want/expect:

{"foo" : "bar"}

Jira doesn't seem to support formatting json as monospace (who would want to do that, right?!).

Is there a workaround?


Solution

  • Yes! Wrap your json in {noformat} tags, like this:

    My Jira description...
    {noformat}
    {"foo" : "bar"}
    {noformat}
    more description

    which gets rendered as:

    My Jira description...

    {"foo" : "bar"}
    

    more description