json icon indicating copy to clipboard operation
json copied to clipboard

support not adding a newline for empty hashes when pretty_generating

Open fawaf opened this issue 5 years ago • 0 comments

currently, pretty_generate will add a newline to the output if there is a hash or array that is empty:

{
  "blah":"bar",
  "foo": {
  },
  "baz": [
  ]
}

this is to add an optional argument to not generate that newline. e.g.

{
  "blah":"bar",
  "foo": {},
  "baz": []
}

fawaf avatar Jul 09 '20 02:07 fawaf