jsonpointer 3.4__py3-none-any.whl → 3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jsonpointer-3.4.data → jsonpointer-3.5.data}/scripts/jsonpointer +5 -2
- {jsonpointer-3.4.dist-info → jsonpointer-3.5.dist-info}/METADATA +1 -1
- jsonpointer-3.5.dist-info/RECORD +8 -0
- {jsonpointer-3.4.dist-info → jsonpointer-3.5.dist-info}/WHEEL +1 -1
- jsonpointer.py +1 -1
- jsonpointer-3.4.dist-info/RECORD +0 -8
- {jsonpointer-3.4.dist-info → jsonpointer-3.5.dist-info}/licenses/AUTHORS +0 -0
- {jsonpointer-3.4.dist-info → jsonpointer-3.5.dist-info}/licenses/LICENSE.txt +0 -0
- {jsonpointer-3.4.dist-info → jsonpointer-3.5.dist-info}/top_level.txt +0 -0
|
@@ -13,7 +13,7 @@ parser = argparse.ArgumentParser(
|
|
|
13
13
|
# Accept pointer as option, as file or as first positional argument
|
|
14
14
|
ptr_group = parser.add_mutually_exclusive_group()
|
|
15
15
|
|
|
16
|
-
ptr_group.add_argument('-f', '--pointer-file', type=argparse.FileType('r'),
|
|
16
|
+
ptr_group.add_argument('-f', '--pointer-file', type=argparse.FileType('r', encoding='utf-8'),
|
|
17
17
|
help='File containing a JSON pointer expression')
|
|
18
18
|
|
|
19
19
|
ptr_group.add_argument('-p', '--pointer', type=str,
|
|
@@ -88,7 +88,7 @@ def resolve_files():
|
|
|
88
88
|
|
|
89
89
|
for name in files:
|
|
90
90
|
try:
|
|
91
|
-
f = argparse.FileType('r')(name)
|
|
91
|
+
f = argparse.FileType('r', encoding='utf-8')(name)
|
|
92
92
|
except argparse.ArgumentTypeError as e:
|
|
93
93
|
parser.error(str(e))
|
|
94
94
|
|
|
@@ -104,6 +104,9 @@ def resolve_files():
|
|
|
104
104
|
|
|
105
105
|
try:
|
|
106
106
|
result = jsonpointer.resolve_pointer(doc, ptr)
|
|
107
|
+
if isinstance(result, jsonpointer.EndOfList):
|
|
108
|
+
raise jsonpointer.JsonPointerException(
|
|
109
|
+
"'-' does not reference an existing array element")
|
|
107
110
|
print(json.dumps(result, indent=args.indent))
|
|
108
111
|
except jsonpointer.JsonPointerException as e:
|
|
109
112
|
print('Could not resolve pointer: %s' % str(e), file=sys.stderr)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
jsonpointer.py,sha256=dFHxeOtzfd-YxA3XWqxlXu1B4Wwyuw_I1N5-mw6MyrQ,13792
|
|
2
|
+
jsonpointer-3.5.data/scripts/jsonpointer,sha256=0P7f_Zh8LYchFYM-rucHmwJdWCfB-mMVBx_bh6DrA_E,3767
|
|
3
|
+
jsonpointer-3.5.dist-info/licenses/AUTHORS,sha256=TVgxnQ9ZyHvvWwez_k2w8ZwtfVVFsDTGv3tXyJu-9X8,113
|
|
4
|
+
jsonpointer-3.5.dist-info/licenses/LICENSE.txt,sha256=2LJPFdRyiF94ii1umFhQ8mRie4YBKhe7JCyD8xDZB-U,1413
|
|
5
|
+
jsonpointer-3.5.dist-info/METADATA,sha256=8WPgQnSCa23SU-kWBz4SWfXW5zX1nyv7DItJ_SkVdGQ,2638
|
|
6
|
+
jsonpointer-3.5.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
7
|
+
jsonpointer-3.5.dist-info/top_level.txt,sha256=BsUcar_C0nZzPGV2ackrJ9CpVU8_0W_pHYKwpdnWddM,12
|
|
8
|
+
jsonpointer-3.5.dist-info/RECORD,,
|
jsonpointer.py
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
# Will be parsed by setup.py to determine package metadata
|
|
34
34
|
__author__ = 'Stefan Kögl <stefan@skoegl.net>'
|
|
35
|
-
__version__ = '3.
|
|
35
|
+
__version__ = '3.5'
|
|
36
36
|
__website__ = 'https://github.com/stefankoegl/python-json-pointer'
|
|
37
37
|
__license__ = 'Modified BSD License'
|
|
38
38
|
|
jsonpointer-3.4.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
jsonpointer.py,sha256=HRi-qytUqsZMCDOUDddMQC4qojDzk75X0PUZZfz20U4,13792
|
|
2
|
-
jsonpointer-3.4.data/scripts/jsonpointer,sha256=aMNUGc0Tro2UnAFF_k3NKKnOovSVBJ8ZOpigcaow97M,3545
|
|
3
|
-
jsonpointer-3.4.dist-info/licenses/AUTHORS,sha256=TVgxnQ9ZyHvvWwez_k2w8ZwtfVVFsDTGv3tXyJu-9X8,113
|
|
4
|
-
jsonpointer-3.4.dist-info/licenses/LICENSE.txt,sha256=2LJPFdRyiF94ii1umFhQ8mRie4YBKhe7JCyD8xDZB-U,1413
|
|
5
|
-
jsonpointer-3.4.dist-info/METADATA,sha256=bVrbJCJq3CdnPkG40Lb9IvATuFjOxqeigYRUByV97dU,2638
|
|
6
|
-
jsonpointer-3.4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
7
|
-
jsonpointer-3.4.dist-info/top_level.txt,sha256=BsUcar_C0nZzPGV2ackrJ9CpVU8_0W_pHYKwpdnWddM,12
|
|
8
|
-
jsonpointer-3.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|