D
D
DUDE2020-11-18 18:57:01
Nginx
DUDE, 2020-11-18 18:57:01

Why is json in asyncpg not a python dict?

I'm reading in the general asyncpg doc and I see that the PosqtgreSQL json and jsonb type are represented as a python str type. Why is it not immediately a dictionary? After all, it is much more convenient to convert json and jsonb directly to a dictionary than to a string.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Entelis, 2016-09-07
@DmitriyEntelis

In one redirect normally in any way.
Imho, it's easier to implement all this logic directly in the website code.
If you are serious about seo - for good, each page should have its own canonical url to which the engine should redirect if something is wrong in the url.

D
Dr. Bacon, 2020-11-18
@stympel

So that you yourself slip your favorite json encoder / decoder into set_type_codec and not torment the developers which one is better / faster. Although there seemed to be another reason, I don’t remember, look for tickets about this on their github.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question