Learn R Programming

json64 (version 0.1.3)

j_encode: Encoding Function

Description

Used to encode a data.frame or list. By default, the output will be a base64 encoded JSON.

Usage

j_encode(data, json = TRUE)

Arguments

data

A list or data.frame to encode.

json

Defaults to TRUE. If TRUE, the output will be a base64 encoded JSON, else, the output will be an encoded string.

Examples

Run this code
# NOT RUN {
# Transform a data.frame to an encoded JSON string
df <- iris
encoded <- j_encode(df, json = TRUE)

# }

Run the code above in your browser using DataLab