loadj {mojson} | R Documentation |
Load a JSON file into an R list
loadj(file, encoding = "UTF-8")
file |
|
encoding |
|
This function provides a simple interface to load a JSON file, meanwhile prints some loading information.
num_of_loaded_obj
tells the length of the JSON object.
duration_seconds
tells the loading duration.
speed_objs_sec
tells the loading speed in objects per second.
obj_len_summary
gives the length summary of each JSON object.
list
. The loading result.
library(mojson)
j <- list(a = list(1, 2), b = 3)
tf <- tempfile()
writeLines(RJSONIO::toJSON(j), tf)
loadj(tf)