Learn R Programming

jsontools (version 0.1.0)

json_prettify: 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

Run this code
# NOT RUN {
x <- c("[1,2,   3]", '{"a": 1, "b": 2}')
json_prettify(x)
json_minify(x)
# }

Run the code above in your browser using DataLab