json-repair 0.29.4__tar.gz → 0.29.5__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. {json_repair-0.29.4/src/json_repair.egg-info → json_repair-0.29.5}/PKG-INFO +1 -1
  2. {json_repair-0.29.4 → json_repair-0.29.5}/pyproject.toml +1 -1
  3. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/json_parser.py +13 -0
  4. {json_repair-0.29.4 → json_repair-0.29.5/src/json_repair.egg-info}/PKG-INFO +1 -1
  5. {json_repair-0.29.4 → json_repair-0.29.5}/LICENSE +0 -0
  6. {json_repair-0.29.4 → json_repair-0.29.5}/README.md +0 -0
  7. {json_repair-0.29.4 → json_repair-0.29.5}/setup.cfg +0 -0
  8. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/__init__.py +0 -0
  9. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/__main__.py +0 -0
  10. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/json_context.py +0 -0
  11. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/json_repair.py +0 -0
  12. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/py.typed +0 -0
  13. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair/string_file_wrapper.py +0 -0
  14. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair.egg-info/SOURCES.txt +0 -0
  15. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair.egg-info/dependency_links.txt +0 -0
  16. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair.egg-info/entry_points.txt +0 -0
  17. {json_repair-0.29.4 → json_repair-0.29.5}/src/json_repair.egg-info/top_level.txt +0 -0
  18. {json_repair-0.29.4 → json_repair-0.29.5}/tests/test_coverage.py +0 -0
  19. {json_repair-0.29.4 → json_repair-0.29.5}/tests/test_json_repair.py +0 -0
  20. {json_repair-0.29.4 → json_repair-0.29.5}/tests/test_performance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: json_repair
3
- Version: 0.29.4
3
+ Version: 0.29.5
4
4
  Summary: A package to repair broken json strings
5
5
  Author-email: Stefano Baccianella <4247706+mangiucugna@users.noreply.github.com>
6
6
  License: MIT License
@@ -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.29.4"
6
+ version = "0.29.5"
7
7
  license = {file = "LICENSE"}
8
8
  authors = [
9
9
  { name="Stefano Baccianella", email="4247706+mangiucugna@users.noreply.github.com" },
@@ -308,6 +308,9 @@ class JSONParser:
308
308
  rstring_delimiter_missing = True
309
309
  # check if this is a case in which the closing comma is NOT missing instead
310
310
  i = self.skip_to_character(character=rstring_delimiter, idx=1)
311
+ # If the rstring_delimeter is escaped then it's not what we are looking for
312
+ while self.get_char_at(i - 1) == "\\":
313
+ i = self.skip_to_character(character=rstring_delimiter, idx=i + 1)
311
314
  next_c = self.get_char_at(i)
312
315
  if next_c:
313
316
  i += 1
@@ -411,6 +414,11 @@ class JSONParser:
411
414
  ):
412
415
  i += 1
413
416
  i = self.skip_to_character(character=rstring_delimiter, idx=i)
417
+ # If the rstring_delimeter is escaped then it's not what we are looking for
418
+ while self.get_char_at(i - 1) == "\\":
419
+ i = self.skip_to_character(
420
+ character=rstring_delimiter, idx=i + 1
421
+ )
414
422
  next_c = self.get_char_at(i)
415
423
  # Ok now I found a delimiter, let's skip whitespaces and see if next we find a }
416
424
  i += 1
@@ -433,6 +441,11 @@ class JSONParser:
433
441
  i = self.skip_to_character(
434
442
  character=rstring_delimiter, idx=i
435
443
  )
444
+ # If the rstring_delimeter is escaped then it's not what we are looking for
445
+ while self.get_char_at(i - 1) == "\\":
446
+ i = self.skip_to_character(
447
+ character=rstring_delimiter, idx=i + 1
448
+ )
436
449
  i += 1
437
450
  next_c = self.get_char_at(i)
438
451
  while next_c and next_c != ":":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: json_repair
3
- Version: 0.29.4
3
+ Version: 0.29.5
4
4
  Summary: A package to repair broken json strings
5
5
  Author-email: Stefano Baccianella <4247706+mangiucugna@users.noreply.github.com>
6
6
  License: MIT License
File without changes
File without changes
File without changes