prettify, minify {jsonlite} | R Documentation |
Prettify adds indentation to a JSON string; minify removes all indentation/whitespace.
prettify(txt, indent = 4) minify(txt)
txt |
JSON string |
indent |
number of spaces to indent |
myjson <- toJSON(cars) cat(myjson) prettify(myjson) minify(myjson)