Skip to content



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


data: JSON (mandatory)#

Data to Pretty Print

target: jQuery object (mandatory)#

Template on which the method will be applied. It will automatically fill that div with the JSON viewer.

args: Object (optional)#

Let you specify a map of options for this helper:

  • sort: Boolean (optional, default: false) - sets whether the keys will be sorted alphabetically or not.
  • level: Number (optional, default 2) - set the number of level that will be expanded automatically.
  • theme: light| dark String (optional, default: light) - choose a theme for the JSON viewer; 'light' or 'dark' are the only accepted options at the moment; Choose dark for a dark background :)


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