Json xml

The plan for this is to reduce it to the parts that must be in the core and more the rest to the appropriate external container (TBD, maybe a gem)

It is ATP now, and we can have the necessary debate about the right way to change routing.