为了用节点填充Jstree,我想创建一个JSON对象,如下所示,
[
{
"data": "Basics",
"state": "closed",
"children": [
{
"data": "login",
"state": "closed",
"children": [
"login",
{
"data": "results",
"state": "closed",
"attr": {
"id": "node-123"
}
}
]
},
{
"data": "Basics",
"state": "closed",
"children": [
"login",
"something",
{
"data": "results",
"state": "closed",
"attr": {
"id": "node-456"
}
}
]
}
]
},
{
"data": "All",
"state": "closed",
"children": [
{
"data": "AddCustomer",
"state": "closed",
"children": [
"login",
"Add",
{
"data": "results",
"state": "closed",
"attr": {
"id": "node-789"
}
}
]
}
]
}
]
但我坚持创建与此JSON对象相关的模型对象。我可以在JSON对象上面生成任何常见的模型对象吗?