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
  • minify
Examples
myjson <- toJSON(cars)
cat(myjson)
prettify(myjson)
minify(myjson)
Documentation reproduced from package jsonlite, version 1.5, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.