Repository navigation
Simple JSON override interface - #4825
Conversation
There was a problem hiding this comment.
The json_encoder and json_decoder code appears to be repeated verbatim for each type of connection. This code should probably be put straight into the Connection class, which is used as the base class for the different types - DefaultConnection, net_twisted.Connection, net_tornado.Connection, and net_asyncio.Connection.
Since this code is common to all the connection types (and doesn't really rely on any ConnectionInstance variables), Connection should just pull json_encoder and json_decorder out of the kwargs, and provide the _get_json_decoder and _get_json_encoder functions that the child classes will inherit.
There was a problem hiding this comment.
I have changed the solution to use Connection properties and reduce code.
|
@grandquista - looks good, but I had a comment to try and reduce the code duplication. Thanks for submitting this! |
|
Awesome, merging. Thanks again for the help, @grandquista! |
…rride Simple JSON override interface
…-json-override Simple JSON override interface
This depends on #4818