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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

265 views 11 10
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