Open HoneyryderChuck opened 3 months ago
It's something one can easily do by calling .compact on the hash passed to JSON.dump, with the caveat of generating an extra object. Ideally one could do something of the kind:
.compact
JSON.dump
JSON.dump_default_options[:ignore_null] = true JSON.dump({bang: nil}) #=> '{}'
It's something one can easily do by calling
.compact
on the hash passed toJSON.dump
, with the caveat of generating an extra object. Ideally one could do something of the kind: