Options Connector returning data in XML format and not JSON

I have implemented JSONGanttConnector on the server side and it returns results from MySQL database 100% fine. I tried using the OptionsConnector along with set_options to populate the select control in my lightbox with data from the MySQL database but this only returns data in XML format. I have tried converting it but have been unsuccessful. Is there any other Connector I can use? This is not received well by the client application and it returns the error: “Uncaught SyntaxError: Unexpected token <”

My server side code is as follows:

<?php include ('connector/dataprocessor.php'); include ('connector/gantt_connector.php'); include ('xmltojson.php'); $dbtype = "MySQL"; $res = mysql_connect("server","username","password"); //server details here mysql_select_db("test_db"); $list = new OptionsConnector($res, $dbtype); $list->render_table("resourcegroup","id","id(value),description(label)"); $gantt = new JSONGanttConnector($res, $dbtype); $gantt->set_options("resourcegroup", $list); $gantt->mix("open",1); $gantt->render_links("links","id","source,target,type"); $gantt->render_table("project","id", "start_date, project, task, resource, status, assigned, duration, parent, resource",""); It returns data in the following format: { "data":[{"id":"3","start_date":"2015-11-16","project":"Project 1","text":"","resource":"","status":"","assigned":"","duration":"12","parent":"0","open":1},{"id":"4","start_date":"2015-11-16","project":"Project 1","text":"Task_1","resource":"AE","status":"Planned","assigned":"ROb","duration":"7","parent":"3","open":1},{"id":"5","start_date":"2015-11-24","project":"Project 2","text":"","resource":"","status":"","assigned":"","duration":"5","parent":"0","open":1}], "collections": {"resourcegroup":[<\/item>\n<\/item>\n<\/item>\n],"links":[]}} resourcegroup is returned in xml format. Please assist :slight_smile:

There is a “JSONOptionsConnector” class, which will work in the same way as OptionsConnector, but will return a valid JSON data.