I have resolved the reported issue. The data I receive in my original post came as a string, exactly as I showed it, minus the spaces and new lines. What I do with these data now is converting it to a Javascript array:
var dataSource = new kendo.data.HierarchicalDataSource({
transport: {
read: "url/to/ajax/service",
parameterMap: function (data, action) {
if (action == "read") {
return {
id: $("#id").val()
};
}
}
},
schema: {
model: {
children: "items",
id: "id",
checked: "checked"
},
data: function(data) {
var dataArray = eval(data);
return dataArray;
}
}
});
var treeView = $("#treeView").kendoTreeView({
checkboxes: {
checkChildren: true
},
loadOnDemand: false,
dataSource: dataSource,
dataTextField: "text"
});
Works fine now.