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

0 vote
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.

0 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

129 views 3 3
Join discussion

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