added conversion from xml to JSON