Description Usage Arguments Value Examples
Uses jsonlite::validate()
under the hood.
1 2 3 | json_is_valid(x)
json_assert_valid(x, x_arg = "")
|
x |
A character vector. |
x_arg |
Argument name for |
json_is_valid()
returns a vector of TRUE
and FALSE
.
json_assert_valid()
either throws an error with information on the invalid
elements or returns x
invisibly
1 2 3 4 5 6 7 8 | json_is_valid("[1, 2]")
json_is_valid("[1, 2")
json_assert_valid("[1, 2]")
## Not run:
json_assert_valid("[1, 2")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.