json-repair 0.47.5__py3-none-any.whl → 0.47.6__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/parse_string.py +18 -1
- {json_repair-0.47.5.dist-info → json_repair-0.47.6.dist-info}/METADATA +1 -1
- {json_repair-0.47.5.dist-info → json_repair-0.47.6.dist-info}/RECORD +7 -7
- {json_repair-0.47.5.dist-info → json_repair-0.47.6.dist-info}/WHEEL +0 -0
- {json_repair-0.47.5.dist-info → json_repair-0.47.6.dist-info}/entry_points.txt +0 -0
- {json_repair-0.47.5.dist-info → json_repair-0.47.6.dist-info}/licenses/LICENSE +0 -0
- {json_repair-0.47.5.dist-info → json_repair-0.47.6.dist-info}/top_level.txt +0 -0
json_repair/parse_string.py
CHANGED
@@ -328,7 +328,24 @@ def parse_string(self) -> str | bool | None:
|
|
328
328
|
if all(str(self.get_char_at(j)).isspace() for j in range(1, i) if self.get_char_at(j)):
|
329
329
|
break
|
330
330
|
if self.context.current == ContextValues.OBJECT_VALUE:
|
331
|
-
|
331
|
+
i = self.skip_whitespaces_at(idx=i + 1, move_main_index=False)
|
332
|
+
if self.get_char_at(i) == ",":
|
333
|
+
# So we found a comma, this could be a case of a single quote like "va"lue",
|
334
|
+
# Search if it's followed by another key, starting with the first delimeter
|
335
|
+
i = self.skip_to_character(character=lstring_delimiter, idx=i + 1)
|
336
|
+
i += 1
|
337
|
+
i = self.skip_to_character(character=rstring_delimiter, idx=i + 1)
|
338
|
+
i += 1
|
339
|
+
i = self.skip_whitespaces_at(idx=i, move_main_index=False)
|
340
|
+
next_c = self.get_char_at(i)
|
341
|
+
if next_c == ":":
|
342
|
+
self.log(
|
343
|
+
"While parsing a string, we a misplaced quote that would have closed the string but has a different meaning here, ignoring it",
|
344
|
+
)
|
345
|
+
string_acc += str(char)
|
346
|
+
self.index += 1
|
347
|
+
char = self.get_char_at()
|
348
|
+
continue
|
332
349
|
# We found a delimiter and we need to check if this is a key
|
333
350
|
# so find a rstring_delimiter and a colon after
|
334
351
|
i = self.skip_to_character(character=rstring_delimiter, idx=i + 1)
|
@@ -10,12 +10,12 @@ json_repair/parse_boolean_or_null.py,sha256=2KoUkjiZ68fkge_n_Q4bbFVG6WskRroKD55j
|
|
10
10
|
json_repair/parse_comment.py,sha256=kNTinpdHZftrtV190-Julq5eKFxMSmGYNbwlj4vGtsg,2492
|
11
11
|
json_repair/parse_number.py,sha256=o7wEER7_H6xG0WsmvKS8VucoMJ7AsaJdxkDzulJ9o-Q,1192
|
12
12
|
json_repair/parse_object.py,sha256=yQ9SilLdBBW5cYJOcQGB4ZR8MtOp4cH6WilfXF_kdgE,4456
|
13
|
-
json_repair/parse_string.py,sha256=
|
13
|
+
json_repair/parse_string.py,sha256=8f-zr9I2n5tAHkot0pBzqcn8avZbhEb-CX0NLwQUMUU,22131
|
14
14
|
json_repair/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
json_repair/string_file_wrapper.py,sha256=tGkWBEUPE-CZPf4uSM5NE9oSDTpskX0myJiXsl-gbds,4333
|
16
|
-
json_repair-0.47.
|
17
|
-
json_repair-0.47.
|
18
|
-
json_repair-0.47.
|
19
|
-
json_repair-0.47.
|
20
|
-
json_repair-0.47.
|
21
|
-
json_repair-0.47.
|
16
|
+
json_repair-0.47.6.dist-info/licenses/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
17
|
+
json_repair-0.47.6.dist-info/METADATA,sha256=S7fZgSot13SzgMXXk4Qh4PJEmDyUJMUy_Vb6FuLW6v8,12411
|
18
|
+
json_repair-0.47.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
json_repair-0.47.6.dist-info/entry_points.txt,sha256=SNfge3zPSP-ASqriYU9r3NAPaXdseYr7ciPMKdV2uSw,57
|
20
|
+
json_repair-0.47.6.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
21
|
+
json_repair-0.47.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|