Converts a XML to JSON.