Skip to contents

The /roller/totalbestand endpoint returns a gzipped JSON array where each element is an entity with nested rollegrupper/roller structure, identical to /enheter/{orgnr}/roller. The array is streamed in batches of complete entities by read_json_objects(), each batch is decoded and flattened by flatten_roles_bulk_fast() and the batches are bound with bind_batches(), so the decoded tree of the whole register (several gigabytes as R lists) is never in memory. The output matches brreg_roles(): resigned is kept only when some role carried fratraadt, NA filled as FALSE.

Usage

parse_roles_bulk(path)

Arguments

path

Path to the gzipped JSON file.

Value

A tibble with one row per role assignment.