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 via the jsonlite package.

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 <- jsonlite::fromJSON(path, simplifyVector = FALSE)
back$results$row_count$status        # "PASS"

rmoriebricklayer documentation built on Aug. 5, 2026, 9:08 a.m.