json-repair 0.45.0__py3-none-any.whl → 0.45.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.
@@ -790,6 +790,11 @@ class JSONParser:
790
790
  break
791
791
  self.log(f"Found block comment: {comment}")
792
792
  return ""
793
+ else:
794
+ # Skip standalone '/' characters that are not part of a comment
795
+ # to avoid getting stuck in an infinite loop
796
+ self.index += 1
797
+ return ""
793
798
  return "" # pragma: no cover
794
799
 
795
800
  def get_char_at(self, count: int = 0) -> str | Literal[False]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_repair
3
- Version: 0.45.0
3
+ Version: 0.45.1
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
@@ -32,7 +32,7 @@ Keywords: JSON,REPAIR,LLM,PARSER
32
32
  Classifier: Programming Language :: Python :: 3
33
33
  Classifier: License :: OSI Approved :: MIT License
34
34
  Classifier: Operating System :: OS Independent
35
- Requires-Python: >=3.9
35
+ Requires-Python: >=3.10
36
36
  Description-Content-Type: text/markdown
37
37
  License-File: LICENSE
38
38
  Dynamic: license-file
@@ -103,6 +103,7 @@ then you can use use it in your code like this
103
103
  good_json_string = repair_json(bad_json_string)
104
104
  # If the string was super broken this will return an empty string
105
105
 
106
+
106
107
  You can use this library to completely replace `json.loads()`:
107
108
 
108
109
  import json_repair
@@ -1,14 +1,14 @@
1
1
  json_repair/__init__.py,sha256=c4L2kZrHvWEKfj_ODU2naliNuvU6FlFVxtF0hbLe6s8,178
2
2
  json_repair/__main__.py,sha256=EsJb-y89uZEvGQQg1GdIDWzfDwfOMvVekKEtdguQXCM,67
3
3
  json_repair/json_context.py,sha256=WsMOjqpGSr6aaDONcrk8UFtTurzWon2Qq9AoBBYseoI,934
4
- json_repair/json_parser.py,sha256=DnLeC0SKTs9yaixYBYZ3J4gwxGXwOLsTWHelptGUp4Q,39407
4
+ json_repair/json_parser.py,sha256=r0v4BkBwrNMoKKIjDFhW6g6arVLB_Wq0zzo1ykYNMxk,39624
5
5
  json_repair/json_repair.py,sha256=9wxf0vVNfr_RNQI1rbVPvxQ9feEwwvgnvkiYXwGEBX8,11292
6
6
  json_repair/object_comparer.py,sha256=ZjxrzepSNGrhiwzid2Dm657x1Aj-E1-h37bDygK8ByE,1261
7
7
  json_repair/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  json_repair/string_file_wrapper.py,sha256=uwW4B1s9Cf-iF3ANsCz-RPu2ddCqDETrt8bdojh8ufA,4485
9
- json_repair-0.45.0.dist-info/licenses/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
10
- json_repair-0.45.0.dist-info/METADATA,sha256=0RAn-AntRZtUdgJcBt8tvsZG-hHadaGfB9Vy2PBRcRk,12157
11
- json_repair-0.45.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
12
- json_repair-0.45.0.dist-info/entry_points.txt,sha256=SNfge3zPSP-ASqriYU9r3NAPaXdseYr7ciPMKdV2uSw,57
13
- json_repair-0.45.0.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
14
- json_repair-0.45.0.dist-info/RECORD,,
9
+ json_repair-0.45.1.dist-info/licenses/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
10
+ json_repair-0.45.1.dist-info/METADATA,sha256=a0Rw8hnNPOoWZwEQC_r3fuWg2SXsZ5YocximamSlRjE,12159
11
+ json_repair-0.45.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
12
+ json_repair-0.45.1.dist-info/entry_points.txt,sha256=SNfge3zPSP-ASqriYU9r3NAPaXdseYr7ciPMKdV2uSw,57
13
+ json_repair-0.45.1.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
14
+ json_repair-0.45.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5