diff --git a/fixit/jsonfmt.py b/fixit/jsonfmt.py index e427e00..89ba00f 100644 --- a/fixit/jsonfmt.py +++ b/fixit/jsonfmt.py @@ -11,6 +11,6 @@ def format_json(raw: str, indent: int = 2) -> str: """ try: data = json.loads(raw) - return json.dumps(data, indent=indent, ensure_ascii=False) + return json.dumps(data, indent=indent) except json.JSONDecodeError: raise ValueError("Invalid JSON") diff --git a/tests/test_jsonfmt.py b/tests/test_jsonfmt.py index 24a5a25..dbdb514 100644 --- a/tests/test_jsonfmt.py +++ b/tests/test_jsonfmt.py @@ -10,8 +10,3 @@ def test_format_json(): def test_invalid_json_friendly_error(): with pytest.raises(ValueError, match="Invalid JSON"): format_json("{not json") - - -def test_format_json_preserves_unicode(): - assert format_json('{"name": "café"}') == '{\n "name": "café"\n}' -