Skip to content

orjson crashes AppResponse.send when sending an object to jsonize #213

@Julien-goupy

Description

@Julien-goupy

Describe the bug

When using AppResponse.send() with _json_serializer set to orjson, the following line crashes:
data = self.app._json_serializer.dumps(message).encode("utf-8")
because the result of orjson.encode is of type bytes and not string.

In Addition, the crash is silent..........

Expected behavior
I expect the lib to work properly

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Version: 0.0.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions