vegawidget (version 0.1.0)

vw_as_json: Coerce vegaspec to JSON

Description

For Vega and Vega-Lite, the translation between lists and JSON is a little bit particular. This function, vw_as_json(), can be used to translate to JSON; as_vegaspec() can be used to translate from JSON.

Usage

vw_as_json(spec, pretty = TRUE)

Arguments

spec

object to be coerced to vegaspec, a Vega/Vega-Lite specification

pretty

logical indicates to use pretty (vs. minified) formatting

Value

jsonlite::json object

See Also

as_vegaspec()

Examples

Run this code
# NOT RUN {
  vw_as_json(spec_mtcars)

# }

Run the code above in your browser using DataCamp Workspace