4 ms·
I started using `jq` for my API project and I have to say it makes JSON munging much nicer on the command line. I think it'd be really cool in order to have a `
by yingw787 6y ago
I started using `jq` for my API project and I have to say it makes JSON munging much nicer on the command line. I think it'd be really cool in order to have a `jq` based redirection service, where you can paste in the URL of the API you want and a query parameter of the `jq` query you want to create.
Something like:
https://jq.io/https://myapi.com/endpoint?jqparams=$PARAMS https://jq.io/https://myapi.com/endpoint?jqparams=$PARAMS
So like bash via HTTP :)
- parentheses 6y agoare you saying you want to use a json object as input to a query? Retool does this btw. I work there because the product is SICK!
- yingw787 6y agoI think `jq`'s syntax is a bit different than bare JSON (I do basic stuff like `echo $CHANNELS_RESPONSE | jq -r ".public_identifier"`), I think it'd be like running a bash script as an input to a query :) Also not sure whether to start repping TinyDev (my project) but I can pass in an arbitrary read-only SQL query via HTTP to create a materialized view from table(s). HTTP + local procedures is like a very simple RPC :)
- PufPufPuf 6y agoThat exists: https://github.com/captn3m0/jqaas https://github.com/captn3m0/jqaas
- yingw787 6y agoOh cool! Kinda wish you had url params vs. having to curl with request data (kinda like https://cors-anywhere.herokuapp.com/ https://cors-anywhere.herokuapp.com/), but wayyy better than nothing!