Fix method of convert to json from xml