6 ms·
Show HN: JSON Query: A tool to query JSON data structures
- hendry 12y agoThe video looks like you are combining keys? You could just do this with http://jsonunroller.appspot.com/ http://jsonunroller.appspot.com/ and grep.
- tuananh 12y agoor you could do it with `curl`, output it to sublime and type `json pretty` (json plugin installed) :)
- geonik 12y agoXPath for JSON? Who would have thought of that! Now add namespaces and you reinvented XML 10 years later
- eCa 12y agohttp://goessner.net/articles/JsonPath/ http://goessner.net/articles/JsonPath/
- oneeyedpigeon 12y agoExcept that, with certain caveats, XML has a slightly nicer syntax for text-heavy documents, and JSON is slightly nicer for hardcore data representation. For example, I'd much rather have a web page in HTML than JSON, but I'd rather have a config file in the latter.
- emmelaich 12y agoHow about Xpath for every configuration file? http://augeas.net/
- conorgdaly 12y agoProbably most people would have thought of it. You wouldn't make that same comparison with regular expressions(tool) and a text document(data) would you? As in, the tool is not part and parcel of the data. XPath(and JSONPath) are powerful tools for programatically pulling data from complex data structures.
- thechao 12y agoThere is a fairly straightforward generalization of the 'axis' concept to allow graph traversal: 'GPath'. (You have to add an annotation for a traversal kind, and an identifier for a property map.) XPath can be straightforwardly desugared to GPath. I implemented this years ago for an EDG IPR[1] back-end, hooked up a number of 'standard queries' over C++ to Todd Veldhuizen's live OpenGL force-directed graph-viewer [2], and watched EDG compile code---pretty wild stuff watching expressions 'bloom', and classes 'become referenced', etc. [1] https://parasol.tamu.edu/pivot/ https://parasol.tamu.edu/pivot/ [2] http://ubietylab.net http://ubietylab.net
- CyberShadow 12y agoIs this a GUI for jq?
- jeffehobbs 12y agoCool tool, nice work!
- rnl 12y agoThis changes everything. Good job
- afandian 12y agoHow? jq is already very usable. https://stedolan.github.io/jq/ https://stedolan.github.io/jq/
- LaSombra 12y agoWhy such tools are more common on OS X?
- jdc0589 12y agoFor those that prefer a command line tool, jq has been around for a while and works very well. I can't count how many times jq let me hack together a bunch of commands I normally would have had to write a small program for. e.g small script that pushes the latest semver tag from a github repo to a geckoboard text widget: https://gist.github.com/jdc0589/67df901f71d96b7649b4 https://gist.github.com/jdc0589/67df901f71d96b7649b4 http://stedolan.github.io/jq/ http://stedolan.github.io/jq/