json-repair 0.55.0__py3-none-any.whl → 0.55.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.
@@ -20,14 +20,14 @@ def parse_number(self: "JSONParser") -> JSONReturnType:
20
20
  number_str += char
21
21
  self.index += 1
22
22
  char = self.get_char_at()
23
+ if (self.get_char_at() or "").isalpha():
24
+ # this was a string instead, sorry
25
+ self.index -= len(number_str)
26
+ return self.parse_string()
23
27
  if number_str and number_str[-1] in "-eE/,":
24
28
  # The number ends with a non valid character for a number/currency, rolling back one
25
29
  number_str = number_str[:-1]
26
30
  self.index -= 1
27
- elif (self.get_char_at() or "").isalpha():
28
- # this was a string instead, sorry
29
- self.index -= len(number_str)
30
- return self.parse_string()
31
31
  try:
32
32
  if "," in number_str:
33
33
  return number_str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_repair
3
- Version: 0.55.0
3
+ Version: 0.55.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-Expression: MIT
@@ -22,14 +22,20 @@ Dynamic: license-file
22
22
  [![Github Sponsors](https://img.shields.io/github/sponsors/mangiucugna)](https://github.com/sponsors/mangiucugna)
23
23
  [![GitHub Repo stars](https://img.shields.io/github/stars/mangiucugna/json_repair?style=flat)](https://github.com/mangiucugna/json_repair/stargazers)
24
24
 
25
+ English | [中文](README.zh.md)
25
26
 
26
27
  This simple package can be used to fix an invalid json string. To know all cases in which this package will work, check out the unit test.
27
28
 
28
29
  ![banner](banner.png)
29
30
 
30
31
  ---
31
- # Offer me a beer
32
- If you find this library useful, you can help me by donating toward my monthly beer budget here: https://github.com/sponsors/mangiucugna
32
+
33
+ # Think about sponsoring this library!
34
+ This library is free for everyone and it's maintained and developed as a side project so, if you find this library useful for your work, consider becoming a sponsor via this link: https://github.com/sponsors/mangiucugna
35
+
36
+ ## Premium sponsors
37
+ - [Icana-AI](https://github.com/Icana-AI) Makers of CallCoach, the world's best Call Centre AI Coach. Visit [https://www.icana.ai/](https://www.icana.ai/)
38
+ - [mjharte](https://github.com/mjharte)
33
39
 
34
40
  ---
35
41
 
@@ -4,7 +4,7 @@ json_repair/json_parser.py,sha256=1C24BNRNOg-hwJzLsCWuW75xYctm0haSynrDsGCy3d8,85
4
4
  json_repair/json_repair.py,sha256=iT-OJgpBnKUJVIV4IUlXmMUkOyW6bNnKCZLB7Fys8hk,12758
5
5
  json_repair/parse_array.py,sha256=rZfnRiS86vBATOUHqSx2T5fE79Ndlk2NoTsg9Wek7l4,2239
6
6
  json_repair/parse_comment.py,sha256=MUDxrx8BFfAaKvx6x4gWviJNvwRi2yv5qnrR6honmas,2660
7
- json_repair/parse_number.py,sha256=0pq0IVasNzjWCN6771DZQ1wS4SJafhm-uVry-qxBel4,1316
7
+ json_repair/parse_number.py,sha256=zSsOZeJb-UTQkOrUSMsLKJJIJ0A9tGdwbQwQCWVOc4o,1314
8
8
  json_repair/parse_object.py,sha256=DH5xAqXIAM0hBhUUblfADuEs2JM8jnvd73h-KbFDcbQ,7859
9
9
  json_repair/parse_string.py,sha256=Dad1iQZDhF5MGAQ5eYs55O810yV1HCYPBkcHYH5AVBU,26275
10
10
  json_repair/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -14,9 +14,9 @@ json_repair/utils/constants.py,sha256=cv2gvyosuq0me0600WyTysM9avrtfXPuXYR26tawcu
14
14
  json_repair/utils/json_context.py,sha256=WsMOjqpGSr6aaDONcrk8UFtTurzWon2Qq9AoBBYseoI,934
15
15
  json_repair/utils/object_comparer.py,sha256=XKV3MRab8H7_v4sm-wpEa5le0XX9OeycWo5S-MFm-GI,1716
16
16
  json_repair/utils/string_file_wrapper.py,sha256=jaS1vl_6qRQLJ-r37wZgMRtUJR6MLgNIGMVLqeGYBSk,6901
17
- json_repair-0.55.0.dist-info/licenses/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
18
- json_repair-0.55.0.dist-info/METADATA,sha256=HQTIQfL3kWWZ5fZ1fzht8cMo6pa7tzF46Ygy1P_udEY,12222
19
- json_repair-0.55.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- json_repair-0.55.0.dist-info/entry_points.txt,sha256=SNfge3zPSP-ASqriYU9r3NAPaXdseYr7ciPMKdV2uSw,57
21
- json_repair-0.55.0.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
22
- json_repair-0.55.0.dist-info/RECORD,,
17
+ json_repair-0.55.1.dist-info/licenses/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
18
+ json_repair-0.55.1.dist-info/METADATA,sha256=3usfVWz8_EMYrgdV3ZkPQ79NPvGYcA6Mpv9nhcjIuK8,12576
19
+ json_repair-0.55.1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
20
+ json_repair-0.55.1.dist-info/entry_points.txt,sha256=SNfge3zPSP-ASqriYU9r3NAPaXdseYr7ciPMKdV2uSw,57
21
+ json_repair-0.55.1.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
22
+ json_repair-0.55.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5