json
json copied to clipboard
support not adding a newline for empty hashes when pretty_generating
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": []
}