loadj {mojson}R Documentation

JSON Load

Description

Load a JSON file into an R list

Usage

loadj(file, encoding = "UTF-8")

Arguments

file

character. A JSON file connection.

encoding

character. Encoding method to use. Defaults to UTF-8.

Details

This function provides a simple interface to load a JSON file, meanwhile prints some loading information.

Value

list. The loading result.

Examples

library(mojson)
j <- list(a = list(1, 2), b = 3)
tf <- tempfile()
writeLines(RJSONIO::toJSON(j), tf)
loadj(tf)

[Package mojson version 0.1 Index]