JSON syntax highlighting in confluence code block

Khun Ivan April 15, 2016

How i can make JSON syntax highlighting in confluence in code block?

5 answers

1 vote
Nar Kumar C_ - Narva Software
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 1, 2019

There is custom code syntax highlighter for Confluence Cloud https://marketplace.atlassian.com/apps/1219685/code-syntax-highlighter

It supports more than 300 programming languages and text formats including JSON.

Note: I am add-on developer.

1 vote
Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2016

Sounds like what you need is a Better Code Macro for Confluence Cloud: https://cloud-code-macro.atlassian.io/redirect/install

I wrote this add-on and I think it's pretty cool! Let me know what you think.

William Carr August 26, 2016

It is pretty cool but the preview does not work. I'm able to add "better code block" macros but when I hit preview in my Confluence document I briefly see a waiting gear where the better code block macros are but then I see nothing in the place where the waiting gears were. If I hit save I see the code blocks rendered as expected.

Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 28, 2016
Munish Desai January 25, 2017

Can this macro be installed on Confluence server?

Also, it seems that the default code macro doesn't display the color highlighting when used in Questions.  Why would this be?  Isn't it the same code macro in both the page editor and Questions editor?

How does one make a new macro appear in the macro browser when trying to insert code in Questions?  Only the default code macro appears.

Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2017

This add-on is only available for Atlassian Cloud. Sorry.

In questions you should be able to start with the { character to load macros. 

0 votes
Robert Galovic February 28, 2019

I wrote a brush for JSON for the code macro - see here (just c&p):

https://community.atlassian.com/t5/Confluence-questions/how-to-highlight-JSON/qaq-p/285735

0 votes
Mayur Jain December 6, 2018
{

}
0 votes
Marcel Nick July 14, 2017

We have developed a Confluence  macro  which provides syntax highlighting for JSON Objects . 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events