Improved translation from XML to Json