View source: R/utils-parsers.R
safe_convert_json | R Documentation |
Note that you should really understand what is in that vector, because this function will discard all errors and replace them with an empty list. The successfully converted vector will be a vector of lists. Each list will have keys corresponding to the JSON keys. If you pass this a JSON string with no keys (e.g. an array or number) it will probably work, but it wasn't built to do that.
safe_convert_json(json_col)
A vector of lists, where each list has keys corresponding to keys in the JSON. It will
use jsonlite::parse_json()
and if it encounters an error, the error is discarded and
replaced with an empty list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.