Skip to main content
#jsonselect.py

<img src="https://travis-ci.org/mwhooker/jsonselect.png" />

jsonselect.py is a python implementation of https://github.com/fd/json_select

You can find more information here http://jsonselect.org/


## Usage

jsonselect can be called directly from the command line.

`python -m jsonselect <selector> < jsonfile`

This is usefull, for example, for parsing out values from JSON APIs.

```sh
$aws ec2 describe-instances --filters "Name=tag:Name,Values=kafka" | python -m jsonselect .InstanceId
["i-12345678", "i-23456789", "i-3456789A"]
```

### Full Usage

```
usage: __main__.py [-h] [--list | --machine-readable] selector [infile]

parse json with jsonselect.

positional arguments:
selector
infile

optional arguments:
-h, --help show this help message and exit
--list, -l new-line separated list of values. works best on lists.
--machine-readable Print json with no formatting
```


## Project status

jsonselect.py currently implements levels 1 & 2 of these conformance tests https://github.com/lloyd/JSONSelectTests

level 3 is unimplemented because I was having trouble understanding what the correct behavior should be


##Tests

get the upstream conformance tests:
git submodule update --init

Run specific level conformance tests with
nosetests -m '.*_level_1' ./tests/test_conformance.py

Metadata

Release files for jsonselect 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsonselect 0.2.3
File Size Uploaded Provenance
jsonselect-0.2.3.tar.gz 13.6 kB Without provenance Details

Release files / jsonselect-0.2.3.tar.gz

Download URL jsonselect-0.2.3.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
95765eb47ba7b114f08cf411511b6a4137302005c8e7789c263747a54c09440a
BLAKE2b-256 checksum
How to use checksums
de56d4753e9bc7495b24f462d1fb050849065a8efc6905b45ee851cd4cdc2c54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for jsonselect 0.2.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page