validate_json_file | R Documentation |
Validate JSON in file or string
validate_json_file(filename, verbose = FALSE, opts = list(), ...)
validate_json_str(str, verbose = FALSE, opts = list(), ...)
filename |
path to file containing JSON |
verbose |
logical. If the JSON is not valid, should a warning be shown giving details? |
opts |
Named list of options for parsing. Usually created by |
... |
Other named options can be used to override any options in |
str |
character string containing JSON |
Logical value. TRUE if JSON validates as OK, otherwise FALSE
tmp <- tempfile()
write_json_file(head(iris, 3), tmp)
validate_json_file(tmp)
str <- write_json_str(iris)
validate_json_str(str)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.