test_jsons | R Documentation |
test_jsons(path = getwd(), files = NULL, db = NULL, recursive = TRUE)
path |
The path name of the JSON files. |
files |
Alternatively, a character list of the input files. |
db |
A mpathsenser database connection (optional). If provided, will be used to check which files are already in the database and check only those JSON files which are not. |
recursive |
Should the listing recurse into directories? |
A message indicating whether there were any issues and a character vector of the file names that need to be fixed. If there were no issues, an invisible empty string is returned.
This function supports parallel processing in the sense that it is able to
distribute it's computation load among multiple workers. To make use of this functionality, run
future::plan("multisession")
before
calling this function.
You can be updated of the progress of this function by using the
progressr::progress()
package. See progressr
's
vignette on
how to subscribe to these updates.
## Not run:
# Test all files in a directory
test_jsons(path = "path/to/jsons", recursive = FALSE)
# Test all files in a directory and its subdirectories
test_jsons(path = "path/to/jsons", recursive = TRUE)
# Test specific files
test_jsons(files = c("file1.json", "file2.json"))
# Test files in a directory, but skip those that are already in the database
test_jsons(path = "path/to/jsons", db = db)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.