% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_metadata.R
\name{.normalize_v3_metadata}
\alias{.normalize_v3_metadata}
\title{Apply Zarr v3-specific fixups to raw array metadata}
\usage{
.normalize_v3_metadata(metadata)
}
\arguments{
\item{metadata}{A list as returned by \code{\link[=.read_json_file]{.read_json_file()}} for a Zarr v3
array node (i.e. \code{metadata$zarr_format == 3L} and
\code{metadata$node_type == "array"}).}
}
\value{
The modified \code{metadata} list.
}
\description{
Called after reading a \code{zarr.json} file for an array node.  Performs four
normalisation steps that are needed before the metadata can be used by the
rest of the package:
}
\details{
\enumerate{
\item Parse the \code{data_type} string into an R-friendly \code{datatype} list.
\item Name \code{codecs} by their \code{name} field for O(1) lookup.
\item Normalise scalar arrays (empty \code{shape}) to shape \code{1}.
\item Inject a default \code{transpose} codec when absent (R uses F-order so we
always need to know the intended order).
\item Replicate the \code{endian} field across all fields of struct datatypes so
that downstream chunk-reading code can treat it uniformly.
}
}
\keyword{internal}
