Added json interpretation and pulled xml representation out of object code