tomnomnom / gron

Make JSON greppable!
MIT License
13.73k stars 325 forks source link

Feature Request: Support for Ruby syntax #120

Open forthrin opened 5 months ago

forthrin commented 5 months ago
$ gron
foo.bar.baz = true;
$ gron -r
foo['bar']['baz'] = true
saraid commented 1 month ago

Try changing the first line to Hashie::Mash.new from the Hashie gem and the rest should work fine.

forthrin commented 1 month ago

You're suggesting some Ruby statement from gem, whereas gron is a shell utility.

saraid commented 1 month ago

I'm presuming you have a use case that involves executing the generated Ruby code in Ruby. If you don't have any use case for this, please ignore my suggestion.

forthrin commented 1 month ago

Ah! The gem generates Ruby statements that builds the hash. Nice tip. Hope for CLI support too.