Skip to contents

Writes a PMO represented as nested R lists back to JSON, reapplying JSON-facing conventions such as zero-based _id fields.

Usage

write_pmo_raw(x, path, pretty = FALSE, auto_unbox = TRUE)

Arguments

x

A nested list as returned by read_pmo_raw().

path

Output path.

pretty

Logical; pretty-print the JSON.

auto_unbox

Logical; passed to jsonlite::toJSON().

Value

Invisibly returns path.

Examples

raw <- read_pmo_raw(
  system.file('extdata', 'example_pmo.json.gz', package = 'pmotoolsr'))
write_pmo_raw(raw, tempfile(fileext = '.json.gz'))