json-stream 2.3.3__tar.gz → 2.3.4__tar.gz
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.
- {json_stream-2.3.3/src/json_stream.egg-info → json_stream-2.3.4}/PKG-INFO +4 -2
- {json_stream-2.3.3 → json_stream-2.3.4}/pyproject.toml +2 -1
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_visitor.py +5 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tokenizer.py +1 -1
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/visitor.py +6 -2
- {json_stream-2.3.3 → json_stream-2.3.4/src/json_stream.egg-info}/PKG-INFO +4 -2
- {json_stream-2.3.3 → json_stream-2.3.4}/LICENSE.txt +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/README.md +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/setup.cfg +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/base.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/dump/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/dump/tests/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/dump/tests/test_dump.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/dump/threading.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/httpx/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/httpx/tests/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/httpx/tests/test_httpx.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/iterators.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/loader.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/requests/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/requests/tests/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/requests/tests/test_requests.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/select_tokenizer.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/__init__.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_buffering.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_collection_abcs.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_iterators.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_loader.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_tokenizer.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_tokenizer_integration.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_util.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/tests/test_writer.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/util.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream/writer.py +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream.egg-info/SOURCES.txt +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream.egg-info/dependency_links.txt +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream.egg-info/requires.txt +0 -0
- {json_stream-2.3.3 → json_stream-2.3.4}/src/json_stream.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: json-stream
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Streaming JSON encoder and decoder
|
|
5
5
|
Author-email: Jamie Cockburn <jamie_cockburn@hotmail.co.uk>
|
|
6
6
|
License: Copyright (c) 2020 Jamie Cockburn
|
|
@@ -39,6 +39,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
39
39
|
Classifier: Programming Language :: Python :: 3.11
|
|
40
40
|
Classifier: Programming Language :: Python :: 3.12
|
|
41
41
|
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
42
43
|
Requires-Python: <4,>=3.5
|
|
43
44
|
Description-Content-Type: text/markdown
|
|
44
45
|
License-File: LICENSE.txt
|
|
@@ -47,6 +48,7 @@ Provides-Extra: requests
|
|
|
47
48
|
Requires-Dist: requests; extra == "requests"
|
|
48
49
|
Provides-Extra: httpx
|
|
49
50
|
Requires-Dist: httpx; extra == "httpx"
|
|
51
|
+
Dynamic: license-file
|
|
50
52
|
|
|
51
53
|
# json-stream
|
|
52
54
|
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "json-stream"
|
|
8
|
-
version = "2.3.
|
|
8
|
+
version = "2.3.4"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Jamie Cockburn", email="jamie_cockburn@hotmail.co.uk"},
|
|
11
11
|
]
|
|
@@ -24,6 +24,7 @@ classifiers = [
|
|
|
24
24
|
"Programming Language :: Python :: 3.11",
|
|
25
25
|
"Programming Language :: Python :: 3.12",
|
|
26
26
|
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Programming Language :: Python :: 3.14",
|
|
27
28
|
]
|
|
28
29
|
requires-python = ">=3.5,<4"
|
|
29
30
|
dependencies = ["json-stream-rs-tokenizer >= 0.4.17"]
|
|
@@ -17,6 +17,11 @@ class TestVisitor(TestCase):
|
|
|
17
17
|
json_stream.visit(BytesIO(self.JSON.encode()), lambda a, b: visited.append((a, b)))
|
|
18
18
|
self._assert_data_okay(visited)
|
|
19
19
|
|
|
20
|
+
def test_visitor_primitive(self):
|
|
21
|
+
visited = []
|
|
22
|
+
json_stream.visit(StringIO("1"), lambda a, b: visited.append((a, b)))
|
|
23
|
+
self.assertListEqual([(1, ())], visited)
|
|
24
|
+
|
|
20
25
|
def _assert_data_okay(self, visited):
|
|
21
26
|
self.assertListEqual([
|
|
22
27
|
(1, ('x',)),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from json_stream.base import StreamingJSONObject, StreamingJSONList, StreamingJSONBase
|
|
2
2
|
from json_stream.iterators import ensure_file
|
|
3
3
|
from json_stream.select_tokenizer import default_tokenizer
|
|
4
|
+
from json_stream.tokenizer import TokenType
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
def _visit(obj, visitor, path):
|
|
@@ -22,6 +23,9 @@ def _visit(obj, visitor, path):
|
|
|
22
23
|
def visit(fp_or_iterator, visitor, tokenizer=default_tokenizer):
|
|
23
24
|
fp = ensure_file(fp_or_iterator)
|
|
24
25
|
token_stream = tokenizer(fp)
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
token_type, token = next(token_stream)
|
|
27
|
+
if token_type == TokenType.OPERATOR:
|
|
28
|
+
obj = StreamingJSONBase.factory(token, token_stream, persistent=False)
|
|
29
|
+
else:
|
|
30
|
+
obj = token
|
|
27
31
|
_visit(obj, visitor, ())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: json-stream
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Streaming JSON encoder and decoder
|
|
5
5
|
Author-email: Jamie Cockburn <jamie_cockburn@hotmail.co.uk>
|
|
6
6
|
License: Copyright (c) 2020 Jamie Cockburn
|
|
@@ -39,6 +39,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
39
39
|
Classifier: Programming Language :: Python :: 3.11
|
|
40
40
|
Classifier: Programming Language :: Python :: 3.12
|
|
41
41
|
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
42
43
|
Requires-Python: <4,>=3.5
|
|
43
44
|
Description-Content-Type: text/markdown
|
|
44
45
|
License-File: LICENSE.txt
|
|
@@ -47,6 +48,7 @@ Provides-Extra: requests
|
|
|
47
48
|
Requires-Dist: requests; extra == "requests"
|
|
48
49
|
Provides-Extra: httpx
|
|
49
50
|
Requires-Dist: httpx; extra == "httpx"
|
|
51
|
+
Dynamic: license-file
|
|
50
52
|
|
|
51
53
|
# json-stream
|
|
52
54
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|