Switched from XML to JSON

I have started the switch from XML to JSON. I have changed the parts I use and guessed at a few others but NOT tested, sorry.