How do I add jason snippet in confluence pages

While editing a page in confluence. I wanted to add some json snippet.

When I click "more content" from top tool bar the "+" button. I search for code macro, I get many language like c++/java/c/python etc, but nothing for JSON and XML.

 

Am I missing anything here ?

2 answers

This widget could not be displayed.
Davin Studer Community Champion Jan 17, 2018

JSON is really just JavaScript (JavaScript Object Notation). Personally, I would use that .

Davin Studer Community Champion Jan 17, 2018

Also, you should have an option for HTML and XML.

I actually tried all languages before posting this question. I don't see even with Javascript, presentation is nothing close to what I get in Jira with code inside "{code:json}" tag.

This widget could not be displayed.
Stephen Deutsch Community Champion Jan 18, 2018

Hi Sandip,

the Code Macro supports adding further languages as SyntaxHighlighter brushes, so you could try to find a brush file and import it into Confluence:

https://www.google.de/search?q=syntaxhighlighter+json+brush

Note that this only works for Confluence Server, if you're using Confluence Cloud, then I would recommend installing the Better Code Macro.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

155 views 12 6
Read article

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