Avoiding double-encoded JSON? #344
Unanswered
liquidcarbon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Starting from a "hello-world" example on FastAPI+Mangum from here,
I got a simple endpoint returning a dict up and running:
It's my understanding that there are two ways to use the Lambda from python:
Is this expected? Is it possible to avoid dumping to a string twice?
requests
to Lambda URL gives the once-encoded bytestring, and onresponse.json()
I recover the plain dict I was asking for.Are there any pros of using 1), or cons of using 2) ? Are there better options - in the context of shuffling around significant MB-sized payloads?
Beta Was this translation helpful? Give feedback.
All reactions