Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I add jason snippet in confluence pages

SANDIP KUMAR DEVNATH January 17, 2018

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 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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.

0 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2018

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

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2018

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

SANDIP KUMAR DEVNATH January 17, 2018

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events