json-repair 0.26.0__py3-none-any.whl → 0.27.1__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_repair.py +3 -3
- {json_repair-0.26.0.dist-info → json_repair-0.27.1.dist-info}/METADATA +1 -1
- json_repair-0.27.1.dist-info/RECORD +7 -0
- json_repair-0.26.0.dist-info/RECORD +0 -7
- {json_repair-0.26.0.dist-info → json_repair-0.27.1.dist-info}/LICENSE +0 -0
- {json_repair-0.26.0.dist-info → json_repair-0.27.1.dist-info}/WHEEL +0 -0
- {json_repair-0.26.0.dist-info → json_repair-0.27.1.dist-info}/top_level.txt +0 -0
json_repair/json_repair.py
CHANGED
@@ -301,7 +301,7 @@ class JSONParser:
|
|
301
301
|
|
302
302
|
char = self.get_char_at()
|
303
303
|
# A valid string can only start with a valid quote or, in our case, with a literal
|
304
|
-
while char and char not in ['"', "'", "“"] and not char.
|
304
|
+
while char and char not in ['"', "'", "“"] and not char.isalnum():
|
305
305
|
self.index += 1
|
306
306
|
char = self.get_char_at()
|
307
307
|
|
@@ -315,7 +315,7 @@ class JSONParser:
|
|
315
315
|
elif char == "“":
|
316
316
|
lstring_delimiter = "“"
|
317
317
|
rstring_delimiter = "”"
|
318
|
-
elif char.
|
318
|
+
elif char.isalnum():
|
319
319
|
# This could be a <boolean> and not a string. Because (T)rue or (F)alse or (N)ull are valid
|
320
320
|
# But remember, object keys are only of type string
|
321
321
|
if char.lower() in ["t", "f", "n"] and self.get_context() != "object_key":
|
@@ -412,7 +412,7 @@ class JSONParser:
|
|
412
412
|
string_acc += char
|
413
413
|
self.index += 1
|
414
414
|
char = self.get_char_at()
|
415
|
-
if len(string_acc) >
|
415
|
+
if len(string_acc) > 0 and string_acc[-1] == "\\":
|
416
416
|
# This is a special case, if people use real strings this might happen
|
417
417
|
self.log("Found a stray escape sequence, normalizing it", "info")
|
418
418
|
string_acc = string_acc[:-1]
|
@@ -0,0 +1,7 @@
|
|
1
|
+
json_repair/__init__.py,sha256=IIzSm1DsCRrr8seF3UeMZXwxcq-tE3j-8d1WBxvEJvE,178
|
2
|
+
json_repair/json_repair.py,sha256=54sOesew2z21WAd4UVaEYOLI8oUkSqF8Z4HbkYBdCj8,31792
|
3
|
+
json_repair-0.27.1.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
4
|
+
json_repair-0.27.1.dist-info/METADATA,sha256=z1CIA9xV6Cnd7Ko49bZ1snzdwJHK-ev8vKCfhV62vzo,7863
|
5
|
+
json_repair-0.27.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
6
|
+
json_repair-0.27.1.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
7
|
+
json_repair-0.27.1.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
json_repair/__init__.py,sha256=IIzSm1DsCRrr8seF3UeMZXwxcq-tE3j-8d1WBxvEJvE,178
|
2
|
-
json_repair/json_repair.py,sha256=OSRwsg96BbOzdgwN3BuynsIu1HxYt1oY4o3kebAXXhQ,31792
|
3
|
-
json_repair-0.26.0.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
4
|
-
json_repair-0.26.0.dist-info/METADATA,sha256=YZ4ccI-izYyi-SXujrNbSpD_Op0CDYAM7DTJ4K9Cfnw,7863
|
5
|
-
json_repair-0.26.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
6
|
-
json_repair-0.26.0.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
7
|
-
json_repair-0.26.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|