diff --git a/esmerald/responses/base.py b/esmerald/responses/base.py index 30422553..432df843 100644 --- a/esmerald/responses/base.py +++ b/esmerald/responses/base.py @@ -209,9 +209,7 @@ def make_response(self, content: Any) -> bytes | memoryview | str: return b'""' # keep it a serialized json object transform_kwargs.setdefault("post_transform_fn", None) - else: - # strip '"' - transform_kwargs.setdefault("post_transform_fn", lambda x: x.strip(b'"')) + # otherwise use default logic of lilya striping '"' with self.with_transform_kwargs(transform_kwargs): # if content is bytes it won't be transformed and # if None or NoReturn, return b"", this differs from the dedicated JSONResponses. diff --git a/pyproject.toml b/pyproject.toml index c03cddd4..b493f94c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ "email-validator >=2.2.0,<3.0.0", "itsdangerous>=2.1.2,<3.0.0", "jinja2>=3.1.2,<4.0.0", - "lilya>=0.11.8", + "lilya>=0.11.9", "loguru>=0.7.0,<0.8.0", "pydantic>=2.10,<3.0.0", "pydantic-settings>=2.0.0,<3.0.0",