diff options
author | Stefan Kögl <stefan@skoegl.net> | 2013-10-12 10:24:37 +0200 |
---|---|---|
committer | Stefan Kögl <stefan@skoegl.net> | 2013-10-12 10:24:37 +0200 |
commit | b607526f60b5b3bc35309058c6df5ecfc710f413 (patch) | |
tree | df4a56b2a2cea52510d5a96e17476b3d1c8a420c /doc | |
parent | 07812c7363de12736e76ba9f376e9eea72b99248 (diff) | |
download | python-json-pointer-b607526f60b5b3bc35309058c6df5ecfc710f413.tar.gz |
add "jsonpointer" commandline utility
Diffstat (limited to 'doc')
-rw-r--r-- | doc/commandline.rst | 33 | ||||
-rw-r--r-- | doc/index.rst | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/doc/commandline.rst b/doc/commandline.rst new file mode 100644 index 0000000..7678442 --- /dev/null +++ b/doc/commandline.rst @@ -0,0 +1,33 @@ +The ``jsonpointer`` commandline utility +======================================= + +The JSON pointer package also installs a ``jsonpointer`` commandline utility +that can be used to resolve a JSON pointers on JSON files. + +The program has the following usage :: + + usage: jsonpointer [-h] [--indent INDENT] [-v] POINTER FILE [FILE ...] + + Resolve a JSON pointer on JSON files + + positional arguments: + POINTER File containing a JSON pointer expression + FILE Files for which the pointer should be resolved + + optional arguments: + -h, --help show this help message and exit + --indent INDENT Indent output by n spaces + -v, --version show program's version number and exit + + +The following shows example usage :: + + $ cat a.json + { "a": [1, 2, 3] } + $ cat b.json + { "a": {"b": [1, 3, 4]}, "b": 1 } + $ cat ptr.json + "/a" + $ jsonpointer ptr.json a.json b.json + [1, 2, 3] + {"b": [1, 3, 4]} diff --git a/doc/index.rst b/doc/index.rst index 02c30c3..dbdf2c6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -17,6 +17,7 @@ and PyPy are supported. tutorial mod-jsonpointer + commandline RFC 6901 <http://tools.ietf.org/html/rfc6901> |