jss
jss is a JSON processing command line tool (like jq).
Unlike jq, its selection language is JSONSelect, 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"
}
}
}
Metadata
Release files for jss 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jss-0.1.0.tar.gz | 4.0 kB | Without provenance | Details for jss-0.1.0.tar.gz |
Release files / jss-0.1.0.tar.gz
| Download URL | jss-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fd59a953af1249c1941e068311b236c81bcb93cb3cc9dd90ba30f712990a39b
|
|
BLAKE2b-256 checksum How to use checksums |
a0a66835f2dd02de41ed123661382ba70110d876afd960368e34d4689eb34cc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jss 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.