Replies: 5 comments 3 replies
-
Totally hacky and ugly - but - hey, it works! instead of this:
you can write this (for jsonb type):
|
Beta Was this translation helpful? Give feedback.
-
Should this project provide a way to configure asyncpg's connection options via |
Beta Was this translation helpful? Give feedback.
-
On https://docs.sqlalchemy.org/en/14/dialects/postgresql.html, we can read this By default asyncpg does not decode the json and jsonb types and returns them as strings. SQLAlchemy sets default type decoder for json and jsonb types using the python builtin json.loads function. The json implementation used can be changed by setting the attribute json_deserializer when creating the engine with create_engine() or create_async_engine(). Maybe we can adopt an option like json_deserializer from databases library !! |
Beta Was this translation helpful? Give feedback.
-
An other solution => "postgresql+aiopg" ;) |
Beta Was this translation helpful? Give feedback.
-
What I am using is middleware based on @qyloxe suggestion so that all my requests have json processed correctly
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions