json_prettify: Prettify/Minify a JSON vector

View source: R/prettify.R

json_prettifyR Documentation

Prettify/Minify a JSON vector

Description

A wrapper around jsonlite::prettify() resp. jsonlite::minify().

Usage

json_prettify(x, indent = 3)

json_minify(x)

Arguments

x

A JSON vector.

indent

number of spaces to indent.

Value

A json2 vector.

Examples

x <- c("[1,2,   3]", '{"a": 1, "b": 2}')
json_prettify(x)
json_minify(x)

mgirlich/jsontools documentation built on March 21, 2023, 9:10 a.m.