View a list object in a JSON viewer via listviewer::jsonedit()
.
Arguments
- listdata
List or string data to view - Although designed for lists,
listdata
can be any data source that can be rendered intoJSON
throughjsonlite::toJSON()
. Alternately,listdata
could be a character string of validJSON
. This might be helpful when dealing with anAPI
response.- ...
Arguments passed on to
listviewer::jsonedit
mode
string
for the initial view frommodes
.'tree'
is the default.modes
string
c('tree', 'text', 'table')
will be the default, since these are all the modes currently supported byjsoneditor
.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.
Examples
view_list(list(1, 2, 3))