% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export.R
\name{export_json}
\alias{export_json}
\title{Export coresynth Results to JSON}
\usage{
export_json(x, file = "coresynth_results.json", inference = NULL, digits = 6L)
}
\arguments{
\item{x}{A \code{coresynth} object from \code{\link[=scm_fit]{scm_fit()}}.}

\item{file}{Output file path. Default \code{"coresynth_results.json"}. Pass
\code{NULL} to skip writing and return the R list invisibly.}

\item{inference}{Optional list from \code{\link[=mspe_ratio_pval]{mspe_ratio_pval()}} or \code{\link[=gsc_boot]{gsc_boot()}}.
When provided, populates the \code{inference} section and updates \code{estimate}
with \code{p_value}, \code{se}, \code{ci_lower}, \code{ci_upper}.}

\item{digits}{Number of significant digits applied to numeric values
(default 6L).}
}
\value{
Invisibly, the R list that was (or would be) serialized.
}
\description{
Generates a comprehensive, standardized JSON record covering all six
estimators. Suitable for reproducibility workflows (Xu & Yang 2026) and
downstream tooling. Pass the result of \code{\link[=mspe_ratio_pval]{mspe_ratio_pval()}} or \code{\link[=gsc_boot]{gsc_boot()}}
via the \code{inference} argument to include inference results.
}
