json-repair 0.15.2__py3-none-any.whl → 0.15.4__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 +13 -5
- {json_repair-0.15.2.dist-info → json_repair-0.15.4.dist-info}/METADATA +1 -1
- json_repair-0.15.4.dist-info/RECORD +7 -0
- json_repair-0.15.2.dist-info/RECORD +0 -7
- {json_repair-0.15.2.dist-info → json_repair-0.15.4.dist-info}/LICENSE +0 -0
- {json_repair-0.15.2.dist-info → json_repair-0.15.4.dist-info}/WHEEL +0 -0
- {json_repair-0.15.2.dist-info → json_repair-0.15.4.dist-info}/top_level.txt +0 -0
json_repair/json_repair.py
CHANGED
@@ -78,7 +78,7 @@ class JSONParser:
|
|
78
78
|
elif char == "“":
|
79
79
|
return self.parse_string(string_quotes=["“", "”"])
|
80
80
|
# <number> starts with [0-9] or minus
|
81
|
-
elif char.isdigit() or char == "-":
|
81
|
+
elif char.isdigit() or char == "-" or char == ".":
|
82
82
|
return self.parse_number()
|
83
83
|
# <boolean> could be (T)rue or (F)alse or (N)ull
|
84
84
|
elif char.lower() in ["t", "f", "n"]:
|
@@ -226,10 +226,18 @@ class JSONParser:
|
|
226
226
|
lstring_delimiter = rstring_delimiter = string_quotes
|
227
227
|
# There is sometimes a weird case of doubled quotes, we manage this also later in the while loop
|
228
228
|
if self.get_char_at(1) == lstring_delimiter:
|
229
|
-
self.
|
230
|
-
|
231
|
-
|
232
|
-
|
229
|
+
next_next_char = self.get_char_at(2) or ""
|
230
|
+
if not next_next_char.isspace() and next_next_char not in [
|
231
|
+
",",
|
232
|
+
":",
|
233
|
+
"]",
|
234
|
+
"}",
|
235
|
+
]:
|
236
|
+
self.log(
|
237
|
+
"While parsing a string, we found a doubled quote, ignoring it",
|
238
|
+
"info",
|
239
|
+
)
|
240
|
+
self.index += 1
|
233
241
|
char = self.get_char_at()
|
234
242
|
if char != lstring_delimiter:
|
235
243
|
self.log(
|
@@ -0,0 +1,7 @@
|
|
1
|
+
json_repair/__init__.py,sha256=AlNie5y6BZBioGi5fzTAUvum_y0U5aL5aNsuQ_68LQc,175
|
2
|
+
json_repair/json_repair.py,sha256=kz8FzeOfSkliMJbAN1reShDfGyGxI2sbozGY6vXKSL0,19576
|
3
|
+
json_repair-0.15.4.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
4
|
+
json_repair-0.15.4.dist-info/METADATA,sha256=a4xk22AfJLAACJFvyAZ29KiYIQ3ngo0VmF7CpbK8wEU,7355
|
5
|
+
json_repair-0.15.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
json_repair-0.15.4.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
7
|
+
json_repair-0.15.4.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
json_repair/__init__.py,sha256=AlNie5y6BZBioGi5fzTAUvum_y0U5aL5aNsuQ_68LQc,175
|
2
|
-
json_repair/json_repair.py,sha256=fMweRMNt58I1YFZTziLnFl_fPLatYtzdiZgsjKQvn24,19298
|
3
|
-
json_repair-0.15.2.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
4
|
-
json_repair-0.15.2.dist-info/METADATA,sha256=i7UP8xs2uuo4ll-Bcs3N90IVK41g1gEYgcu6kLGQeWo,7355
|
5
|
-
json_repair-0.15.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
json_repair-0.15.2.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
7
|
-
json_repair-0.15.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|