monster.ui.renderJSON()

Syntax

monster.ui.renderJSON(data, target[, args]);

Parameters

KeyDescriptionTypeDefaultRequired
dataData to pretty print.JSONtrue
targetTemplate on which the method will be applied. It will automatically fill that div with the JSON viewer.jQuerytrue
argsLet you specify a map of options for this helper.Object(#/args)false

args

KeyDescriptionTypeDefaultRequired
sortWhether the keys will be sorted alphabetically or not.Booleanfalsefalse
levelSet the number of level that will be expanded automatically.Number2false
themViewer background them.`String(‘light''dark’)`light

Description

This helper will use the data provided in parameter and show it in a JSON viewer in the UI, in the container provided

On this page