diff --git a/duckduckgo_search/utils.py b/duckduckgo_search/utils.py index daa957a..2ad107e 100644 --- a/duckduckgo_search/utils.py +++ b/duckduckgo_search/utils.py @@ -1,3 +1,4 @@ +import json import re from decimal import Decimal from html import unescape @@ -5,8 +6,6 @@ from typing import Any, Dict, List, Union from urllib.parse import unquote -import orjson - from .exceptions import DuckDuckGoSearchException REGEX_STRIP_TAGS = re.compile("<.*?>") @@ -14,14 +13,14 @@ def json_dumps(obj: Any) -> str: try: - return orjson.dumps(obj).decode("utf-8") + return json.dumps(obj) except Exception as ex: raise DuckDuckGoSearchException(f"{type(ex).__name__}: {ex}") from ex def json_loads(obj: Union[str, bytes]) -> Any: try: - return orjson.loads(obj) + return json.loads(obj) except Exception as ex: raise DuckDuckGoSearchException(f"{type(ex).__name__}: {ex}") from ex diff --git a/pyproject.toml b/pyproject.toml index b065a5d..aafcc6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,6 @@ classifiers = [ dependencies = [ "click>=8.1.7", "pyreqwest_impersonate>=0.4.9", - "orjson>=3.10.6", ] dynamic = ["version"]