Skip to contents

Handles both bare {fields, records} and the {result: {fields, records}} wrapper shape.

Usage

morie_arsau_read_sidecar(path)

Arguments

path

Path to the JSON file.

Value

Named list with fields and records.

Examples

tf <- tempfile(fileext = ".json")
writeLines('{"fields": [{"id": "a", "type": "int"}]}', tf)
res <- morie_arsau_read_sidecar(tf)
res$fields
#> [[1]]
#> [[1]]$id
#> [1] "a"
#> 
#> [[1]]$type
#> [1] "int"
#> 
#> 
unlink(tf)