dot_files
counsel-jq
dot_files | counsel-jq | |
---|---|---|
1 | 3 | |
10 | 123 | |
- | 0.8% | |
1.8 | 0.0 | |
12 months ago | 10 months ago | |
Shell | Emacs Lisp | |
- | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dot_files
-
Extracting Objects Recursively with Jq
I tend to use jq a lot. As others have said, sometimes jq can be hard to grasp. Often it requires multiple attempts to get the correct answer. To make it a little easier for me, I've written a helper function[0] that combines it with fzf[1] to run jq as a REPL on any json. It allows to incrementally alter your DSL without having to continually call jq. This is similar to jid/jiq but a little more powerful. It includes functions to change the preview to output raw, compact (or not), and some other things.
I didn't use jid/jiq because jid uses go-simplejson, which is nowhere near as powerful as jq, and jiq seemed very buggy when I used it and it felt like it was hacked together. Plus there was no where to change jq's arguments while running it.
I'm sure this function can be improved on, but this has been good enough for me so far.
Also, I run gojq[2] instead of jq. It is a drop-in replacement for jq but is written in Go, and has some improvements over jq such as bug fixes, support for yaml input, and it also provides more helpful error messages.
[0] https://github.com/hoshsadiq/dot_files/blob/master/zshrc.d/m...
counsel-jq
-
jq 1.7 Released
Didn’t know this. Thanks for the tip!
Personally, when I test REST APIs, I use „restclient.el“ all the time which also comes with a great JQ integration („jq-set-var“ for example for deriving request variables from responses). For traversing larger responses I use „counsel-jq“ in a customized JSON mode: https://github.com/200ok-ch/counsel-jq
But I’ll give the major mode a try, too.
- jless: a command-line JSON viewer, written in Rust
-
Extracting Objects Recursively with Jq
If anyone is an emacs user and this sounds compelling, I recommend counsel-jq[0] for the sort of feedback loop described here.
[0]: https://github.com/200ok-ch/counsel-jq
What are some alternatives?
gojq - Pure Go implementation of jq
jfq - JSONata on the command line
fzf - :cherry_blossom: A command-line fuzzy finder
jet - CLI to transform between JSON, EDN, YAML and Transit using Clojure
rsl - reserialise: lossy but versatile conversion between data serialisation formats
setup - My config, system settings, utilities, etc.
jackson-jq - jq for Jackson Java JSON Processor
jq - Command-line JSON processor [Moved to: https://github.com/jqlang/jq]
yaml.el - YAML parser in Elisp