You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example code above, I would expect working and broken to be approximately equivalent.
However, while working returns the parsed json_list as expected, broken fails with
{"detail":[{"loc":["body","json_list"],"msg":"JSON object must be str, bytes or bytearray","type":"type_error.json"}]}
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.95.0
Python Version
Python 3.10.8
Additional Context
sample request that fails with broken and works with working:
Hi @Kludex@harpaj
As I've been reviewing this issue, a few questions have arisen.
Is the primary goal of this issue to enable the Form() function to directly receive data in JSON format? Or, is the focus more on providing documentation and examples for handling this indirectly?
Is there a need for detailed documentation on this phenomenon and its causes? Is the goal to provide guidelines to help users understand and appropriately manage this issue?
Discussed in #9305
Originally posted by harpaj March 23, 2023
First Check
Commit to Help
Example Code
Description
In the example code above, I would expect
working
andbroken
to be approximately equivalent.However, while
working
returns the parsed json_list as expected,broken
fails withOperating System
Linux
Operating System Details
No response
FastAPI Version
0.95.0
Python Version
Python 3.10.8
Additional Context
sample request that fails with
broken
and works withworking
:The text was updated successfully, but these errors were encountered: