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
I have a JSON-based API that is often returning cached blocks of JSON as part of its responses. The majority of the the time generating responses for users was spent dumping large blocks of JSON into Python dicts, lists etc. only to immediately load them as part of a JSON response. To improve its performance I've written a terrible hack. Since #118 was fixed my terrible hack no longer works.
Instead of making my hack even worse, I would like to submit a change to simplejson that would let me hook the _iterencode step to produce my own raw JSON as part of the encoded result. Would you accept such a change, and how would you like to see it done?
The text was updated successfully, but these errors were encountered:
simplejson supports a for_json method on objects when for_json=True. How about I add a for_raw_json option that behaves the same way, but returns a unicode string containing already-encoded JSON?
I think that there are already too many options, maybe the right thing to do here is to provide a specific class that can be used for this purpose. It can be a bit more backwards compatible given a for_json that returns the parsed contents.
I have a JSON-based API that is often returning cached blocks of JSON as part of its responses. The majority of the the time generating responses for users was spent dumping large blocks of JSON into Python dicts, lists etc. only to immediately load them as part of a JSON response. To improve its performance I've written a terrible hack. Since #118 was fixed my terrible hack no longer works.
Instead of making my hack even worse, I would like to submit a change to simplejson that would let me hook the
_iterencode
step to produce my own raw JSON as part of the encoded result. Would you accept such a change, and how would you like to see it done?The text was updated successfully, but these errors were encountered: