json-repair 0.47.2__tar.gz → 0.47.3__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_repair-0.47.2/src/json_repair.egg-info → json_repair-0.47.3}/PKG-INFO +1 -1
- {json_repair-0.47.2 → json_repair-0.47.3}/pyproject.toml +1 -1
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/json_parser.py +4 -0
- {json_repair-0.47.2 → json_repair-0.47.3/src/json_repair.egg-info}/PKG-INFO +1 -1
- {json_repair-0.47.2 → json_repair-0.47.3}/tests/test_json_repair.py +4 -1
- {json_repair-0.47.2 → json_repair-0.47.3}/LICENSE +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/README.md +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/setup.cfg +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/__init__.py +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/__main__.py +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/json_context.py +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/json_repair.py +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/object_comparer.py +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/py.typed +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair/string_file_wrapper.py +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair.egg-info/SOURCES.txt +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair.egg-info/dependency_links.txt +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair.egg-info/entry_points.txt +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/src/json_repair.egg-info/top_level.txt +0 -0
- {json_repair-0.47.2 → json_repair-0.47.3}/tests/test_performance.py +0 -0
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
4
4
|
[project]
|
5
5
|
name = "json_repair"
|
6
|
-
version = "0.47.
|
6
|
+
version = "0.47.3"
|
7
7
|
license = {file = "LICENSE"}
|
8
8
|
authors = [
|
9
9
|
{ name="Stefano Baccianella", email="4247706+mangiucugna@users.noreply.github.com" },
|
@@ -377,6 +377,10 @@ class JSONParser:
|
|
377
377
|
):
|
378
378
|
rstring_delimiter_missing = True
|
379
379
|
# check if this is a case in which the closing comma is NOT missing instead
|
380
|
+
self.skip_whitespaces_at()
|
381
|
+
if self.get_char_at(1) == "\\":
|
382
|
+
# Ok this is a quoted string, skip
|
383
|
+
rstring_delimiter_missing = False
|
380
384
|
i = self.skip_to_character(character=rstring_delimiter, idx=1)
|
381
385
|
next_c = self.get_char_at(i)
|
382
386
|
if next_c:
|
@@ -241,7 +241,10 @@ def test_object_edge_cases():
|
|
241
241
|
repair_json('{ "key": ["arrayvalue"], "key3": "value3", ["arrayvalue1"] }')
|
242
242
|
== '{"key": ["arrayvalue"], "key3": "value3", "arrayvalue1": ""}'
|
243
243
|
)
|
244
|
-
assert
|
244
|
+
assert (
|
245
|
+
repair_json('{"key": "{\\\\"key\\\\\\":[\\"value\\\\\\"],\\"key2\\":"value2"}"}')
|
246
|
+
== '{"key": "{\\"key\\":[\\"value\\"],\\"key2\\":\\"value2\\"}"}'
|
247
|
+
)
|
245
248
|
assert repair_json('{"key": , "key2": "value2"}') == '{"key": "", "key2": "value2"}'
|
246
249
|
|
247
250
|
|
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
|