Metadata-Version: 1.1
Name: jss
Version: 0.1.0
Summary: JSON processing command line tool based on JSONSelect
Home-page: https://github.com/danvk/jss/
Author: Dan Vanderkam
Author-email: danvdk@gmail.com
License: UNKNOWN
Description: jss
        ===
        
        jss is a JSON processing command line tool (like jq).
        
        Unlike `jq <http://stedolan.github.io/jq/>`__, its selection language is
        `JSONSelect <http://jsonselect.org/#overview>`__, which is based on CSS
        selectors. No need to learn an ad-hoc language for processing your JSON
        files. Just use one you already know! Your time with jss won't be
        wasted—it will make you better at writing CSS selectors.
        
        Usage
        -----
        
        ::
        
            $ pip install -g jss
        
            $ cat file.json
            {
              "foo": [
                "bar",
                {
                  "baz": "quux"
                }
              ],
              "wut": {
                "name": "foo",
                "metadata": {
                  "owner": "danvk",
                  "blah": "whatever"
                }
              },
              "name": "dan"
            }
        
            # Pull out all values with key "name", from anywhere in the JSON.
            $ jss .name file.json
            "foo"
            "dan"
        
            # Remove fields named "metadata", wherever they occur (JSON→JSON transform):
            $ jss -v .metadata file.json
            {
              "foo": [
                "bar",
                {
                  "baz": "quux"
                }
              ],
              "wut": {
                "name": "foo"
              },
              "name": "dan"
            }
        
            # Keep only fields named "name", plus their ancestors (JSON→JSON transform):
            $ jss -k .name file.json
            {
              "wut": {
                "name": "foo"
              },
              "name": "dan"
            }
        
            # Keep only top-level entries with "whatever" in some value underneath them:
            # (JSON→JSON transform using jQuery-style selectors):
            $ jss -k ':root>*:has(:contains("whatever"))' file.json
            {
              "wut": {
                "name": "foo",
                "metadata": {
                  "owner": "danvk",
                  "blah": "whatever"
                }
              }
            }
        
        
Keywords: css,json,jsonselect
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Utilities
Classifier: Topic :: Text Processing
