jsonlite (version 0.9.0)

prettify: Prettify JSON

Description

Add proper whitespace and indentation to a JSON string.

Usage

prettify(txt)

Arguments

txt
JSON string

Examples

Run this code
myjson <- toJSON(cars, pretty=FALSE)
myprettyjson <- prettify(myjson)
cat(myprettyjson)

Run the code above in your browser using DataLab