Validates JSON
validate_json(json)
character or json object
logical vector
validate_json('[]')
#> [1] TRUE
df <- data.frame(id = 1:5, val = letters[1:5])
validate_json( to_json(df) )
#> [1] TRUE
validate_json('{"x":1,"y":2,"z":"a"}')
#> [1] TRUE
validate_json( c('{"x":1,"y":2,"z":"a"}', to_json(df) ) )
#> [1] TRUE TRUE
validate_json( c('{"x":1,"y":2,"z":a}', to_json(df) ) )
#> [1] FALSE TRUE