validate_json_file {yyjsonr} | R Documentation |
Validate JSON in file or string
Description
Validate JSON in file or string
Usage
validate_json_file(filename, verbose = FALSE, opts = list(), ...)
validate_json_str(str, verbose = FALSE, opts = list(), ...)
Arguments
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 |
Value
Logical value. TRUE if JSON validates as OK, otherwise FALSE
Examples
tmp <- tempfile()
write_json_file(head(iris, 3), tmp)
validate_json_file(tmp)
str <- write_json_str(iris)
validate_json_str(str)
[Package yyjsonr version 0.1.20 Index]