[Python-ideas] add jsonrpc to stdlib "Internet Protocols and Support" akin to xmlrpc

Achim Andreas von Roznowski dev at roznowski.net
Mon Jul 25 04:04:27 EDT 2016


I am new to this mailing list, hopefully this idea hasn't been raised  
already - I searched the PEPs and python-ideas and couldn't find anything  
similar, so decided to post this idea. Please forgive me if it is a  

Idea: add jsonprc server and client to stdlib "Internet Protocols and  

I would like to suggest adding a jsonrpc server and client to the stdlib  
"Internet Protocols and Support"  with identical functionality to the  
existing xmlrpc.server and client but using json instead of xml, including  
a subclass SimpleJSONRPCServer just like SimpleXMLRPCServer based on  

JSON is a very common data encoding format, widely established and very  
close to python's dictionaries, yet there exists today no jsonrpc server  
in stdlib.
Many jsonrpc implementations using external libraries are available, so  
there is clearly demand, but no standard python library.
All of these external implementations seem to require other external  
libraries for transport, eg. Werkzeug - no way to do this just using  
stdlib classes.

Envisaged Features
Identical to existing xmlrpc, just using json instead of xml encoding:

I am too new to python-dev so others should estimate this, but it seems to  
me that all the hard work has already been done with xmlrpc - only the  
encoding would have to be adapted to encode/decode json instead of xml,  
which seems trivial, given that a json module already exists in stdlib.

I appreciate your feedback.

Kind regards,

Achim Andreas von Roznowski

More information about the Python-ideas mailing list