2 ms·
So, what I'm seeing is that I currently have JQ, and if I get around to dealing with Postgre, I might also have SQL's JSONPath. And then if I get tired of juggl
by aasasd 7y ago
So, what I'm seeing is that I currently have JQ, and if I get around to dealing with Postgre, I might also have SQL's JSONPath. And then if I get tired of juggling objects/dicts/arrays in my programs, I can also pick a not-quite-the-same JSONPath as a lib.
(Though the latter is unlikely, since Lisp and FP have taught me that a bunch of functions feeding into each other will do exactly the same thing quite fine.)
- neilv 7y agoOleg Kiselyov's SXPath work shows XPath as combinators, in Scheme. John Clements's packaging of SXPath for Racket might be the most accessible way to first look at it: https://docs.racket-lang.org/sxml/sxpath.html https://docs.racket-lang.org/sxml/sxpath.html Then Kiselyov's original writings: http://okmij.org/ftp/Scheme/xml.html#SXPath http://okmij.org/ftp/Scheme/xml.html#SXPath Before Web browsers had nice developer tools in them, I made a little aid for crafting SXPath queries, for HTML scraping: https://www.neilvandyke.org/racket/webscraperhelper/ https://www.neilvandyke.org/racket/webscraperhelper/
- Terretta 7y agoDon’t forget JMESPath, as built into AWS CLI: http://jmespath.org/ http://jmespath.org/ With language libraries or as jp CLI: http://jmespath.org/libraries.html http://jmespath.org/libraries.html Example AWS CLI tricks: https://gist.github.com/magnetikonline/6a382a4c4412bbb68e33e137b9a74168 https://gist.github.com/magnetikonline/6a382a4c4412bbb68e33e... https://opensourceconnections.com/blog/2015/07/27/advanced-aws-cli-jmespath-query/ https://opensourceconnections.com/blog/2015/07/27/advanced-a...
- kapilvt 7y agoJmespath is also built in to the azure cli