我有休息服务,它在下面产生 JSON 数据:
{
"root": {
"branches": [
{
"branch_addr": "string",
"branch_telp": "string",
"branch_loc": "string",
"branch_dept_it": {
"branch_dept_it_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_it_code": "string"
}
},
"branch_dept_finance": {
"branch_dept_finance_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_finance_code": "string"
}
},
"branch_name": "Mars",
"branch_id": "MarsID"
},
{
"branch_addr": "string",
"branch_telp": "string",
"branch_loc": "string",
"branch_dept_it": {
"branch_dept_it_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_it_code": "string"
}
},
"branch_dept_finance": {
"branch_dept_finance_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_finance_code": "string"
}
},
"branch_name": "VENUS",
"branch_id": "venusID"
},
{
"branch_addr": "string",
"branch_telp": "string",
"branch_loc": "string",
"branch_dept_it": {
"branch_dept_it_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_it_code": "string"
}
},
"branch_dept_finance": {
"branch_dept_finance_employees": {
"properties": [
{
"content": "string",
"attr": "emp_id"
},
{
"content": "string",
"attr": "emp_name"
},
{
"content": "string",
"attr": "emp_pos"
}
],
"branch_dept_finance_code": "string"
}
},
"branch_name": "Mercury",
"branch_id": "mercuryID"
}
],
"regions": {
"region_data": {
"properties": [
{
"content": "string",
"attr": "reg_id"
},
{
"content": "string",
"attr": "reg_name"
},
{
"content": "string",
"attr": "reg_loc"
}
],
"region_name": "Galaxy"
}
},
"other": {
"other_data": {
"properties": [
{
"content": "string",
"attr": "reg_id"
},
{
"content": "string",
"attr": "reg_name"
},
{
"content": "string",
"attr": "reg_loc"
}
],
"region_name": "Galaxy"
}
}
},
"tree": {
"tree_var1": "string",
"tree-var2": "string",
"tree-var3": "string"
}
}
当我检查控制台浏览器时,RESTful 服务已经通过 JsonRestStore 中定义的特定查询正确获取。
如何在 dojox.grid.DataGrid / dijit.tree (Dojo 1.8) 中根据上述格式显示?