write_manifest_json: Write a Manifest to JSON

View source: R/lib_manifest.R

write_manifest_jsonR Documentation

Write a Manifest to JSON

Description

Serializes a manifest to a pretty-printed JSON file with the native JSON codec (bricklayer_json_to_json()); no jsonlite needed.

Usage

write_manifest_json(manifest, path)

Arguments

manifest

A manifest as returned by make_manifest() / built up with record().

path

Destination path for the JSON file.

Value

The path, returned invisibly.

Examples

man <- make_manifest(list(project = "demo"), environment = FALSE)
man <- record(man, "row_count", observed = 20, expected = 20)
path <- write_manifest_json(man, tempfile(fileext = ".json"))
file.exists(path)

# Round-trips back through jsonlite.
back <- bricklayer_json_from_json(path, simplifyVector = FALSE)
back$results$row_count$status        # "PASS"

rmoriebricklayer documentation built on Sept. 9, 2026, 1:06 a.m.