Jsonization restyle

I was in the midst of a merge that fixed up a bunch of stuff, then hit mtypedef.cpp, which is not remotely ready to go.  So here's a merge and cleanup.