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
The docs explicitly call out a Drop-in API which will "just work". This module covers json.{load,loads,dump,dumps}, where {dump,dumps} are aliased to the built-in module. I propose adding an alias to json.JSONEncoder to make the drop-in API more complete. I don't think this should be problematic as one would only use a JSONEncoder for the dump/s commands, which are already aliased.
The docs explicitly call out a Drop-in API which will "just work". This module covers
json.{load,loads,dump,dumps}
, where{dump,dumps}
are aliased to the built-in module. I propose adding an alias tojson.JSONEncoder
to make the drop-in API more complete. I don't think this should be problematic as one would only use aJSONEncoder
for thedump/s
commands, which are already aliased.In a current project, I have something like this:
If an alias is added, the above snippet would be:
It's a rather minor tweak, but I think it would be nice for developer experience.
Cheers
The text was updated successfully, but these errors were encountered: