Skip to contents

View a list object in a JSON viewer via listviewer::jsonedit().

Usage

view_list(listdata = NULL, ...)

Arguments

listdata

List or string data to view - Although designed for lists, listdata can be any data source that can be rendered into JSON through jsonlite::toJSON(). Alternately, listdata could be a character string of valid JSON. This might be helpful when dealing with an API response.

...

Arguments passed on to listviewer::jsonedit

mode

string for the initial view from modes. 'tree' is the default.

modes

string c('tree', 'text', 'table') will be the default, since these are all the modes currently supported by jsoneditor.

width

integer in pixels defining the width of the div container.

height

integer in pixels defining the height of the div container.

elementId

character to specify valid CSS id of the htmlwidget for special situations in which you want a non-random identifier.

Value

A JSON viewer of the list data.

Examples

view_list(list(1, 2, 3))