[Python-ideas] JSON encoder protocol