Skip to main content

Module json

Module json 

Source
Expand description

JSON builtins โ€” fromJSON() and toJSON() providing jsonlite-compatible conversion between R values and JSON strings.

Staticsยง

__BUILTIN_REG_BUILTIN_FROM_JSON ๐Ÿ”’
__BUILTIN_REG_BUILTIN_TO_JSON ๐Ÿ”’

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::Value to an RValue.
list_to_json ๐Ÿ”’
Convert an R list to JSON. Named lists become objects; unnamed lists become arrays.
rvalue_to_json ๐Ÿ”’
Convert an RValue to a serde_json::Value.
try_array_as_dataframe ๐Ÿ”’
Try to convert a JSON array of objects into a data.frame. Returns None if 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 None if 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.