xml to json

From http://davidwalsh.name/convert-xml-json