json-repair 0.15.0__py3-none-any.whl → 0.15.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.
- json_repair/json_repair.py +8 -9
- {json_repair-0.15.0.dist-info → json_repair-0.15.1.dist-info}/METADATA +1 -1
- json_repair-0.15.1.dist-info/RECORD +7 -0
- json_repair-0.15.0.dist-info/RECORD +0 -7
- {json_repair-0.15.0.dist-info → json_repair-0.15.1.dist-info}/LICENSE +0 -0
- {json_repair-0.15.0.dist-info → json_repair-0.15.1.dist-info}/WHEEL +0 -0
- {json_repair-0.15.0.dist-info → json_repair-0.15.1.dist-info}/top_level.txt +0 -0
json_repair/json_repair.py
CHANGED
@@ -453,27 +453,26 @@ def repair_json(
|
|
453
453
|
|
454
454
|
|
455
455
|
def loads(
|
456
|
-
json_str: str,
|
456
|
+
json_str: str, skip_json_loads: bool = False, logging: bool = False
|
457
457
|
) -> Union[Dict[str, Any], List[Any], str, float, int, bool, None]:
|
458
458
|
"""
|
459
459
|
This function works like `json.loads()` except that it will fix your JSON in the process.
|
460
460
|
It is a wrapper around the `repair_json()` function with `return_objects=True`.
|
461
461
|
"""
|
462
|
-
return repair_json(json_str, True)
|
462
|
+
return repair_json(json_str, True, skip_json_loads, logging)
|
463
463
|
|
464
464
|
|
465
|
-
def load(
|
466
|
-
|
465
|
+
def load(
|
466
|
+
fp: TextIO, skip_json_loads: bool = False, logging: bool = False
|
467
|
+
) -> Union[Dict[str, Any], List[Any], str, float, int, bool, None]:
|
468
|
+
return loads(fp.read(), skip_json_loads, logging)
|
467
469
|
|
468
470
|
|
469
471
|
def from_file(
|
470
|
-
filename: str,
|
472
|
+
filename: str, skip_json_loads: bool = False, logging: bool = False
|
471
473
|
) -> Union[Dict[str, Any], List[Any], str, float, int, bool, None]:
|
472
474
|
fd = open(filename)
|
473
|
-
jsonobj = load(fd)
|
475
|
+
jsonobj = load(fd, skip_json_loads, logging)
|
474
476
|
fd.close()
|
475
477
|
|
476
478
|
return jsonobj
|
477
|
-
|
478
|
-
|
479
|
-
print(repair_json('{ "key": "value", "key2": }', logging=True))
|
@@ -0,0 +1,7 @@
|
|
1
|
+
json_repair/__init__.py,sha256=AlNie5y6BZBioGi5fzTAUvum_y0U5aL5aNsuQ_68LQc,175
|
2
|
+
json_repair/json_repair.py,sha256=oGD3DDU_Gni7HA25Mlnx4b5_b7c8F_kRSNrxAR3f9sk,19297
|
3
|
+
json_repair-0.15.1.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
4
|
+
json_repair-0.15.1.dist-info/METADATA,sha256=Kpv-aRkvY2N4YOLS9z61lKtD5IeoN0qg74Z0-y7mHtk,7355
|
5
|
+
json_repair-0.15.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
json_repair-0.15.1.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
7
|
+
json_repair-0.15.1.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
json_repair/__init__.py,sha256=AlNie5y6BZBioGi5fzTAUvum_y0U5aL5aNsuQ_68LQc,175
|
2
|
-
json_repair/json_repair.py,sha256=ctuP4AaBrsWBzhF2Al-gX_itHcTG15cqU4Z56KYxNfA,19119
|
3
|
-
json_repair-0.15.0.dist-info/LICENSE,sha256=wrjQo8MhNrNCicXtMe3MHmS-fx8AmQk1ue8AQwiiFV8,1076
|
4
|
-
json_repair-0.15.0.dist-info/METADATA,sha256=bnhSr8AectNHH-ljyaqwIC5BqPkVf2uYwLHuNuUYpyQ,7355
|
5
|
-
json_repair-0.15.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
json_repair-0.15.0.dist-info/top_level.txt,sha256=7-VZwZN2CgB_n0NlSLk-rEUFh8ug21lESbsblOYuZqw,12
|
7
|
-
json_repair-0.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|