powered by
Load a JSON file into an R list
loadj(file, encoding = "UTF-8")
character. A JSON file connection.
character
character. Encoding method to use. Defaults to UTF-8.
list. The loading result.
list
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.
num_of_loaded_obj
duration_seconds tells the loading duration.
duration_seconds
speed_objs_sec tells the loading speed in objects per second.
speed_objs_sec
obj_len_summary gives the length summary of each JSON object.
obj_len_summary
# NOT RUN { library(mojson) j <- list(a = list(1, 2), b = 3) tf <- tempfile() writeLines(RJSONIO::toJSON(j), tf) loadj(tf) # }
Run the code above in your browser using DataLab