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
Since you are advertising the use of ujson, I was expecting that it is being used as a drop-in everywhere in starlette. When I post to a simple route handler without any body content, I see an exception coming from the standard library, however. Is this a special case when there is no body content or is ujson only used in serializing the JSONResponse?
Closing this off. In fact I think we should possibly add a UJSONResponse, and only use ujson when that's done so explicitly. (Since it has some edge-cases where its behavior differs.)
and only use ujson when that's done so explicitly.
It would be quite handy if there was a way to (explicitly) tell starlette to use ujson everywhere. I only realized this isn't the case by profiling a high volume route that's already using UJSONResponse and seeing json.loads taking more time than the rest of the (non-trivial) route-specific logic combined.
Since you are advertising the use of ujson, I was expecting that it is being used as a drop-in everywhere in starlette. When I post to a simple route handler without any body content, I see an exception coming from the standard library, however. Is this a special case when there is no body content or is ujson only used in serializing the
JSONResponse
?Code:
Traceback:
The text was updated successfully, but these errors were encountered: