{{#*inline "getAppMenuItems"}}[
                    {{#each menuGroup.psAppMenuItems as |appMenuItem|}}
                        {
                            "id": "{{appMenuItem.name}}",
                            "name": "{{appMenuItem.caption}}"{{#if appMenuItem.psAppMenuItems}},
                            "item": {{>getAppMenuItems menuGroup=appMenuItem}}
                            {{/if}}
                        }{{#unless @last}},{{/unless}}
                    {{/each}}
                    ]
{{/inline}}
{
    "systemid": "{{system.codeName}}",
    "systemname": "{{system.logicName}}",
    "unires": [ 
        {{#each system.allPSSysUniReses as |unires|}}
        {
            "unirescode": "{{unires.resCode}}",
            "uniresname": "{{unires.name}}"
        }{{#unless @last}},{{/unless}}
        {{/each}}
    ],
    "appmenus": [ 
        {{#each system.apps as |app|}}
        {
            "appid": "{{app.codeName}}",
            "appname": "{{app.name}}",
            "appmenu": [
            {{#each app.allPSAppMenuModels as |appMenu|}}
                {
                    "menuid": "{{appMenu.codeName}}",
                    "menuname": "{{appMenu.name}}",
                    "menuitem": {{>getAppMenuItems menuGroup=appMenu}}
                }{{#unless @last}},{{/unless}}
            {{/each}}
            ]
        }{{#unless @last}},{{/unless}}    
        {{/each}}
    ],
    "entities": [
        {{#each system.entities as |de|}}
        {
            "dename":"{{de.codeName}}",
            "delogicname": "{{de.logicName}}",
            "sysmodule": {
                "id": "{{upperCase de.psSystemModule.codeName}}",
                "name": "{{de.psSystemModule.name}}"
            },
            "dedataset": [
                {{#each de.dataSets as |dataSet|}}
                {
                    "id": "{{dataSet.codeName}}",
                    "name": "{{#if dataSet.logicName}}{{dataSet.logicName}}{{else}}{{dataSet.codeName}}{{/if}}"
                }{{#unless @last}},{{/unless}}
                {{/each}}
            ],
            "deaction": [
                {{#each de.actions as |action|}}
                {
                    "id": "{{action.codeName}}",
                    "name": "{{#if action.logicName}}{{action.logicName}}{{else}}{{action.codeName}}{{/if}}",
                    "type": "{{action.actionType}}"
                }{{#unless @last}},{{/unless}}
                {{/each}}
            ],
            "datascope": [
                {{#each de.dataScopes as |dataScope|}}
                {
                    "id": "{{dataScope.id}}",
                    "name": "{{dataScope.name}}"
                }{{#unless @last}},{{/unless}}
                {{/each}}
            ]
        }{{#unless @last}},{{/unless}}
        {{/each}}
    ]
}



