Skip to contents

as_json() returns a JSON string that carries the parsed object's public R-side state and the raw compiler artifact JSON. saveRDS() / readRDS() remains the primary persistence path for fitted objects; revive() restores process-local caches after deserialization.

Usage

as_json(x, pretty = FALSE, ...)

# S3 method for class 'mm_compiled'
as_json(x, pretty = FALSE, ...)

Arguments

x

A compiled mm_spec or fitted mm_fit.

pretty

Logical; pretty-print JSON when TRUE.

...

Reserved for future methods.

Value

A length-one character string containing JSON.