JSON Macro Usage

Adding a JSON Macro

You can add the JSON macro in any Confluence page or blog.

  1. Start in edit mode of the page or blog
  2. Click on the "+" at the top of the page
  3. Find "JSON Viewer" from the drop down list or click "Other macros"
  4. Search for JSON viewer Macro in the search bar
  5. The Insert JSON Viewer dialog will open
  6. Enter the view mode , width & height in the boxes
  7. Click "Insert"
  8. Copy and paste a valid JSON object in the macro body
  9. Save the page

Macro Options

Mode 

Macro Viewer supports plain text, code & tree view modes.

                           Configure JSON view mode based on your preference 

Width

The "Width" option allows users to configure the width of the macro block. Default width is 500 px. 

Height

The "Height" option allows users to configure the height of the macro block. Default width is 200 px. 


Editing JSON Macro

  1. Start in edit mode of the page or blog
  2. Select the macro and click edit option
  3. Change the macro options and click save
  4. Change the JSON content in macro body if needed.
  5. Save the page

JSON Validation 

JSON Viewer Macro for Confluence detects any syntax errors in your JSON Object and highlights them on Page Publish. 



JSON Object Validation

To correct syntax errors enter a valid JSON object in the macro body