json-repair 0.36.0__tar.gz → 0.36.1__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.36.0/src/json_repair.egg-info → json_repair-0.36.1}/PKG-INFO +1 -1
  2. {json_repair-0.36.0 → json_repair-0.36.1}/pyproject.toml +1 -1
  3. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/json_parser.py +1 -1
  4. {json_repair-0.36.0 → json_repair-0.36.1/src/json_repair.egg-info}/PKG-INFO +1 -1
  5. {json_repair-0.36.0 → json_repair-0.36.1}/tests/test_json_repair.py +1 -0
  6. {json_repair-0.36.0 → json_repair-0.36.1}/LICENSE +0 -0
  7. {json_repair-0.36.0 → json_repair-0.36.1}/README.md +0 -0
  8. {json_repair-0.36.0 → json_repair-0.36.1}/setup.cfg +0 -0
  9. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/__init__.py +0 -0
  10. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/__main__.py +0 -0
  11. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/json_context.py +0 -0
  12. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/json_repair.py +0 -0
  13. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/py.typed +0 -0
  14. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair/string_file_wrapper.py +0 -0
  15. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair.egg-info/SOURCES.txt +0 -0
  16. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair.egg-info/dependency_links.txt +0 -0
  17. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair.egg-info/entry_points.txt +0 -0
  18. {json_repair-0.36.0 → json_repair-0.36.1}/src/json_repair.egg-info/top_level.txt +0 -0
  19. {json_repair-0.36.0 → json_repair-0.36.1}/tests/test_coverage.py +0 -0
  20. {json_repair-0.36.0 → json_repair-0.36.1}/tests/test_performance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: json_repair
3
- Version: 0.36.0
3
+ Version: 0.36.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
@@ -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.36.0"
6
+ version = "0.36.1"
7
7
  license = {file = "LICENSE"}
8
8
  authors = [
9
9
  { name="Stefano Baccianella", email="4247706+mangiucugna@users.noreply.github.com" },
@@ -589,7 +589,7 @@ class JSONParser:
589
589
  i += 1
590
590
  next_c = self.get_char_at(i)
591
591
  while next_c and next_c != ":":
592
- if next_c == "," or (
592
+ if next_c in [",", "]", "}"] or (
593
593
  next_c == rstring_delimiter
594
594
  and self.get_char_at(i - 1) != "\\"
595
595
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: json_repair
3
- Version: 0.36.0
3
+ Version: 0.36.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
@@ -109,6 +109,7 @@ def test_missing_and_mixed_quotes():
109
109
  assert repair_json('{"key": "lorem ipsum ... "sic " tamet. ...}') == '{"key": "lorem ipsum ... \\"sic \\" tamet. ..."}'
110
110
  assert repair_json('{"key": value , }') == '{"key": "value"}'
111
111
  assert repair_json('{"comment": "lorem, "ipsum" sic "tamet". To improve"}') == '{"comment": "lorem, \\"ipsum\\" sic \\"tamet\\". To improve"}'
112
+ assert repair_json('{"key": "v\"alu\"e"} key:') == '{"key": "v\\"alu\\"e"}'
112
113
 
113
114
  def test_array_edge_cases():
114
115
  assert repair_json("[1, 2, 3,") == "[1, 2, 3]"
File without changes
File without changes
File without changes