<#if isRoot> [{ "text": "<@s.m "commonType.root"/>", "classes": "folder" <#if list?size gt 0>, "expanded": true, "children": [ <#list list as commonType> { "id": "${commonType.id}", "text": "${commonType.name}", "classes": "<#if commonType.child?size gt 0>folder<#else>file", "hasChildren": <#if commonType.child?size gt 0>true<#else>false }<#if commonType_has_next>, ] }] <#else> [ <#list list as commonType> { "id": "${commonType.id}", "text": "${commonType.name}", "classes": "<#if commonType.child?size gt 0>folder<#else>file", "hasChildren": <#if commonType.child?size gt 0>true<#else>false }<#if commonType_has_next>, ]