json-repair 0.29.7__py3-none-any.whl → 0.29.8__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.
- json_repair/json_parser.py +8 -0
- {json_repair-0.29.7.dist-info → json_repair-0.29.8.dist-info}/METADATA +1 -1
- {json_repair-0.29.7.dist-info → json_repair-0.29.8.dist-info}/RECORD +7 -7
- {json_repair-0.29.7.dist-info → json_repair-0.29.8.dist-info}/LICENSE +0 -0
- {json_repair-0.29.7.dist-info → json_repair-0.29.8.dist-info}/WHEEL +0 -0
- {json_repair-0.29.7.dist-info → json_repair-0.29.8.dist-info}/entry_points.txt +0 -0
- {json_repair-0.29.7.dist-info → json_repair-0.29.8.dist-info}/top_level.txt +0 -0
json_repair/json_parser.py
CHANGED
@@ -291,6 +291,7 @@ class JSONParser:
|
|
291
291
|
# * It iterated over the entire sequence
|
292
292
|
# * If we are fixing missing quotes in an object, when it finds the special terminators
|
293
293
|
char = self.get_char_at()
|
294
|
+
unmatched_delimiter = False
|
294
295
|
while char and char != rstring_delimiter:
|
295
296
|
if (
|
296
297
|
missing_quotes
|
@@ -377,6 +378,11 @@ class JSONParser:
|
|
377
378
|
"In a string with missing quotes and object value context, I found a delimeter but it turns out it was the beginning on the next key. Stopping here.",
|
378
379
|
)
|
379
380
|
break
|
381
|
+
elif unmatched_delimiter:
|
382
|
+
unmatched_delimiter = False
|
383
|
+
string_acc += str(char)
|
384
|
+
self.index += 1
|
385
|
+
char = self.get_char_at()
|
380
386
|
else:
|
381
387
|
# Check if eventually there is a rstring delimiter, otherwise we bail
|
382
388
|
i = 1
|
@@ -430,6 +436,7 @@ class JSONParser:
|
|
430
436
|
self.log(
|
431
437
|
"While parsing a string, we misplaced a quote that would have closed the string but has a different meaning here since this is the last element of the object, ignoring it",
|
432
438
|
)
|
439
|
+
unmatched_delimiter = not unmatched_delimiter
|
433
440
|
string_acc += str(char)
|
434
441
|
self.index += 1
|
435
442
|
char = self.get_char_at()
|
@@ -459,6 +466,7 @@ class JSONParser:
|
|
459
466
|
self.log(
|
460
467
|
"While parsing a string, we a misplaced quote that would have closed the string but has a different meaning here, ignoring it",
|
461
468
|
)
|
469
|
+
unmatched_delimiter = not unmatched_delimiter
|
462
470
|
string_acc += str(char)
|
463
471
|
self.index += 1
|
464
472
|
char = self.get_char_at()
|
@@ -1,13 +1,13 @@
|
|
1
1
|
json_repair/__init__.py,sha256=IIzSm1DsCRrr8seF3UeMZXwxcq-tE3j-8d1WBxvEJvE,178
|
2
2
|
json_repair/__main__.py,sha256=EsJb-y89uZEvGQQg1GdIDWzfDwfOMvVekKEtdguQXCM,67
|
3
3
|
json_repair/json_context.py,sha256=DdJu3DJR-ANvr8KrWfJqdtOE3uI6_B0VQidKvE3PjJA,1080
|
4
|
-
json_repair/json_parser.py,sha256=
|
4
|
+
json_repair/json_parser.py,sha256=sAsGtUt-LUOXhSxViYDoCsQFINw29O1cmfSchTNfJPs,26793
|
5
5
|
json_repair/json_repair.py,sha256=GTg3OAXRbAJAHWs8oiQDqUHh4h6qKDVvWPXcrqafzLY,6100
|
6
6
|
json_repair/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
json_repair/string_file_wrapper.py,sha256=EHLhNBWoyUitzT08thytYJiNZh_klEFwfT8zutPSdb4,3905
|
8
|
-
json_repair-0.29.
|
9
|
-
json_repair-0.29.
|
10
|
-
json_repair-0.29.
|
11
|
-
json_repair-0.29.
|
12
|
-
json_repair-0.29.
|
13
|
-
json_repair-0.29.
|
8
|
+
json_repair-0.29.8.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
9
|
+
json_repair-0.29.8.dist-info/METADATA,sha256=yH1vmRAkZC8knJkMtcbVUSloE2sSMkOFFru-ZKgrhVk,10686
|
10
|
+
json_repair-0.29.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
11
|
+
json_repair-0.29.8.dist-info/entry_points.txt,sha256=SNfge3zPSP-ASqriYU9r3NAPaXdseYr7ciPMKdV2uSw,57
|
12
|
+
json_repair-0.29.8.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
13
|
+
json_repair-0.29.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|