将数据库查出数据拼装成以下格式的json:
{"models":[
{"modelname":"首页","modelurl":"/home","modelid":371,"fatherid":0,"nextModel":[],
"permissions":[
{"permissionid": 47,"permissionname": "首页","permissionclassic": "菜单"},
{ "permissionid": 49,"permissionname": "个人中心","permissionclassic": "菜单"}
]},
{"modelname":"首页","modelurl":"/home","modelid":371,"fatherid":0,
"nextModel":[{"modelname":"首页","modelurl":"/home","modelid":371,"fatherid":371},
{"modelname":"首页","modelurl":"/home","modelid":371,"fatherid":371,"nextModel":[],
"permissions":[
{"permissionid": 47,"permissionname": "首页","permissionclassic": "菜单"},
{"permissionid": 47,"permissionname": "首页","permissionclassic": "菜单"}
]}],"permissions":[]
}
]}
头都绕晕了