% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dev.R
\name{plotly_json}
\alias{plotly_json}
\title{Inspect JSON sent to plotly.js}
\usage{
plotly_json(p = last_plot(), jsonedit = interactive(), pretty = TRUE, ...)
}
\arguments{
\item{p}{a plotly or ggplot object.}

\item{jsonedit}{use \link[listviewer:jsonedit]{listviewer::jsonedit} to view the JSON?}

\item{pretty}{adds indentation whitespace to JSON output. Can be TRUE/FALSE
or a number specifying the number of spaces to indent. See \link[jsonlite:prettify]{jsonlite::prettify}.}

\item{...}{other options passed onto \link[listviewer:jsonedit]{listviewer::jsonedit}}
}
\description{
This function is useful for obtaining/viewing/debugging JSON
sent to plotly.js.
}
\examples{
  
plotly_json(plot_ly())
plotly_json(plot_ly(), FALSE)
}
