Skip to contents

Downloads a JSON file stored in a MinIO bucket and parses it into R. Internally, the function retrieves the object contents as raw bytes using minio_get_object, converts them to text, and then delegates parsing to fromJSON.

Usage

minio_get_json(bucket, object, ...)

Arguments

bucket

Character. Name of the MinIO bucket.

object

Character. Object key (path) of the JSON file within the bucket.

...

Additional arguments passed to jsonlite::fromJSON().

Value

An R object representing the parsed JSON content (often a list or vector; not necessarily a data.frame).

Details

Unlike other minio_get_* readers, this function does not enforce a tabular structure. The returned object is exactly what jsonlite::fromJSON() produces, typically a list, vector, or nested structure depending on the JSON content and parsing options.

Additional arguments are forwarded to jsonlite::fromJSON(), allowing control over simplification, flattening, unboxing, and handling of nested data.

Examples

if (FALSE) { # \dontrun{
json <- minio_get_json(
  bucket = "assets",
  object = "config/settings.json",
  simplifyVector = FALSE
)

json$database$host
} # }