toJSON: Transform an R data structure into JSON

View source: R/BrowserViz-class.R

toJSONR Documentation

Transform an R data structure into JSON

Description

The semantics of toJSON changed between RJSONIO and jsonlite: in the latter, scalars are promoted to arrays of length 1. rather than change our javascript code, and since such promotion – while sensible in the context of R – strikes me as gratuitous, I follow jeroen ooms suggestion, creating this wrapper

Usage

toJSON(..., auto_unbox = TRUE)

Arguments

...

Extra arguments passed to this function

auto_unbox

Logical

Value

a character string with the JSON representation of the R object

Examples


 toJSON(data.frame(a=8:10, b=LETTERS[8:10], stringsAsFactors=FALSE))


paul-shannon/BrowserViz documentation built on Jan. 15, 2024, 10:27 p.m.