<#if isRoot> [{ "text": "<@s.m "resource.root"/>", "classes": "folder" <#if resList?size gt 0>, "expanded": true, "children": [ <#list resList as res> { "id": "${res.name}", "text": "${res.filename}", "classes": "${res.directory?string('folder','file')}", "hasChildren": ${res.directory?string('true','false')} }<#if res_has_next>, ] }] <#else> [ <#list resList as res> { "id": "${res.name}", "text": "${res.filename}", "classes": "${res.directory?string('folder','file')}", "hasChildren": ${res.directory?string('true','false')} }<#if res_has_next>, ]