Simplify the code for picking json serialization functions to expose the logic better
Simplify the code for picking json serialization functions to expose the logic better

ipython/ipython,ipython/ipython