% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coerce.R
\name{as.raw.ts_tree}
\alias{as.raw.ts_tree}
\title{Raw bytes of a document of a tree-sitter tree}
\usage{
\method{as.raw}{ts_tree}(x)
}
\arguments{
\item{x}{A \code{ts_tree} object.}
}
\value{
A raw vector containing the bytes of the document of the tree.
}
\description{
Raw bytes of a document of a tree-sitter tree
}
\examples{
\dontshow{if (requireNamespace("tsjsonc", quietly = TRUE)) withAutoprint(\{ # examplesIf}
# Create a parse tree with tsjsonc -------------------------------------
tree <- tsjsonc::ts_parse_jsonc('{"foo": 42, "bar": [1, 2, 3]}')

tree
as.raw(tree)
\dontshow{\}) # examplesIf}
}
\seealso{
\code{\link[=as.character.ts_tree]{as.character.ts_tree()}} to get the document as a character scalar.
}
