makeJson.data.frame: JSON converter for data frames

View source: R/jsonConvert.R

makeJson.data.frameR Documentation

JSON converter for data frames

Description

Function to create a JSON from a data.frame

Usage

## S3 method for class 'data.frame'
makeJson(df, convert.logical = TRUE, dataframe = c("rows", "columns"))

Arguments

df

the data.frame to be converted into JSON

convert.logical

whether to convert logicals into strings "TRUE" and "FALSE"

dataframe

how to encode data.frame objects: must be one of 'rows', 'columns'

Value

a stringified JSON, the data.frame is encoded as a vector of objects, with each column being one object with keys corresponding to column names.


Shians/Glimma documentation built on Sept. 7, 2024, 4:25 p.m.