View source: R/jsonNormalize.R
jsonNormalize | R Documentation |
Attempts to normalize or fix a JSON string. Trailing commas are removed, and all keys of the normalized JSON string are double-quoted.
jsonNormalize(jstring, prettify = FALSE, to = NULL)
jstring |
a character string, the JSON string to be normalized, or the path to a JSON file |
prettify |
Boolean, whether to prettify the normalized JSON string |
to |
|
The normalized JSON string.
The special JavaScript values undefined
and NaN
are not
allowed in JSON strings. If one of them occurs in the input string, it is
replaced by the empty string.
library(jsonNormalize)
# the keys of the following JSON string are not quoted
jstring <- "[{area:30,ind:[5,3.7], cluster:true,},{ind:[],cluster:false},]"
cat(jsonNormalize(jstring, prettify = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.