prettify, minify

0th

Percentile

Prettify or minify a JSON string

Prettify adds indentation to a JSON string; minify removes all indentation/whitespace.

Usage
prettify(txt, indent = 4)

minify(txt)

Arguments
txt

JSON string

indent

number of spaces to indent

Aliases
  • prettify, minify
  • prettify
  • minify
Examples
# NOT RUN {
myjson <- toJSON(cars)
cat(myjson)
prettify(myjson)
minify(myjson)
# }
Documentation reproduced from package jsonlite, version 1.7.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.