Learn R Programming

jsonify (version 1.2.2)

pretty_json: Pretty Json

Description

Adds indentiation to a JSON string

Usage

pretty_json(json, ...)

Arguments

json

string of JSON

...

other argments passed to to_json

Examples

Run this code

df <- data.frame(id = 1:10, val = rnorm(10))
js <- to_json( df )
pretty_json(js)

## can also use directly on an R object
pretty_json( df )

Run the code above in your browser using DataLab