% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/json-schema.R
\name{validate_pedon_json}
\alias{validate_pedon_json}
\title{Validate a PedonRecord against the JSON schema}
\usage{
validate_pedon_json(x)
}
\arguments{
\item{x}{A \code{\link{PedonRecord}} or a list with the same shape.}
}
\value{
A logical scalar (\code{TRUE} when valid). Validation errors
        appear as the \code{errors} attribute when \code{FALSE}.
}
\description{
Convenience wrapper that converts a \code{\link{PedonRecord}} (or a
compatible list) to JSON and validates it via
\code{jsonvalidate::json_validate} against the canonical schema
returned by \code{\link{pedon_json_schema}}.
}
\details{
Use this BEFORE calling \code{classify_*} when ingesting data from
external systems (web APIs, ETL pipelines, multimodal extraction)
to catch schema violations early.
}
\examples{
\dontrun{
p <- make_ferralsol_canonical()
validate_pedon_json(p)
#> [1] TRUE
}
}
