Expand description
JSON builtins โ fromJSON() and toJSON() providing jsonlite-compatible
conversion between R values and JSON strings.
Staticsยง
Functionsยง
- builtin_
from_ ๐json - Parse a JSON string into an R value.
- builtin_
to_ ๐json - Convert an R value to a JSON string.
- coerce_
json_ ๐column - Coerce a column of JSON values to an R vector. Tries integer -> double -> character, with null becoming NA.
- double_
to_ ๐json - Convert an f64 to a JSON number, handling special values.
- json_
array_ ๐to_ rvalue - Convert a JSON array to an R value.
- json_
object_ ๐to_ rvalue - Convert a JSON object to a named list.
- json_
to_ ๐rvalue - Convert a
serde_json::Valueto anRValue. - list_
to_ ๐json - Convert an R list to JSON. Named lists become objects; unnamed lists become arrays.
- rvalue_
to_ ๐json - Convert an
RValueto aserde_json::Value. - try_
array_ ๐as_ dataframe - Try to convert a JSON array of objects into a data.frame.
Returns
Noneif the array elements are not all objects with the same keys. - try_
array_ ๐as_ vector - Try to convert a JSON array of scalars into an atomic vector.
Returns
Noneif the array contains non-scalar values. - vector_
to_ ๐json - Convert an atomic vector to JSON. Scalars (length 1) become JSON scalars; longer vectors become JSON arrays.