Change XML to JSON for ajax call