sanitize_for_json: Sanitize Object for JSON Serialization
Description
Standardizes R objects for consistent JSON serialization, especially
for ggplot2 elements like units and margins.
Usage
sanitize_for_json(x, plot_dims = list(width = 8, height = 6))
Value
A sanitized list or vector.
Arguments
- x
Object to sanitize.
- plot_dims
Optional list with width and height in inches.