JSON::Tight::Formatter
Applies the layout strategies described on JSON::Tight. Build one
directly instead of calling JSON::Tight.generate to reuse it across
documents or to control the indent used by expanded layouts.
formatter = JSON::Tight::Formatter.new(width: 100, indent: 4)
formatter.format(STDOUT, value)
Constructors
Instance methods
Writes value to io, formatted and ending in a newline.
Writes value, which may be anything that responds to #to_json, to
io, formatted and ending in a newline.
Parses json and writes it to io, reformatted and ending in a
newline. Raises JSON::ParseException if json is not valid JSON.