{
    "@odata.context" : "<%= basepath %>/$metadata#TaskService.TaskService",
    "@odata.id": "<%= url %>",
    "@odata.type": "#TaskService.v1_0_0.TaskService",
    "Oem" : {
        "RackHD" : {
            "SystemTaskCollection": {
                "Members@odata.count": <%= systems.length %>,
                "Members": [
                <% systems.forEach(function(system, i, arr) { %>
                    {
                        "@odata.id": "<%= basepath %>/TaskService/Oem/Tasks/<%=system%>"
                    }
                    <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
                <% }); %>
                ]
            }
        }
    },
    "Id": "TaskService",
    "Name": "Tasks Service",
    "CompletedTaskOverWritePolicy": "Manual",
    "DateTime": "<%= dateTime %>",
    "LifeCycleEventOnTaskStateChange": false,
    "ServiceEnabled": true,
    "Status": {},
    "Tasks": {
        "@odata.type": "#TaskCollection.TaskCollection",
        "Name": "Task Collection",
        "Members": [
        <% graphs.forEach(function(graph, i, arr) { %>
            {
                "@odata.type": "#Task.1.0.0.Task",
                "@odata.id": "<%= basepath %>/TaskService/Tasks/<%=graph.id%>",
                "@odata.context": "<%= basepath %>/$metadata#TaskService/Tasks/$entity",
                "Name": "<%= graph.name %>",
                "TaskState": "<%= graph.state %>",
                "Messages": [],
                "TaskStatus": "<%= graph.status %>",
                "StartTime": "<%= graph.startTime %>",
                "EndTime": "<%= graph.endTime %>",
                "Id": "<%= graph.id %>",
                "Oem" : {
                    "RackHD": {
                        "SystemId": "<%= graph.node %>"
                    }
                }
            }
            <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
        <% }); %>
        ]
    }
}

{
    "@odata.context" : "<%= basepath %>/$metadata#TaskService.TaskService",
    "@odata.id": "<%= url %>",
    "@odata.type": "#TaskService.v1_0_0.TaskService",
    "Oem" : {
        "RackHD" : {
            "SystemTaskCollection": {
                "Members@odata.count": <%= systems.length %>,
                "Members": [
                <% systems.forEach(function(system, i, arr) { %>
                    {
                        "@odata.id": "<%= basepath %>/TaskService/Oem/Tasks/<%=system%>"
                    }
                    <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
                <% }); %>
                ]
            }
        }
    },
    "Id": "TaskService",
    "Name": "Tasks Service",
    "CompletedTaskOverWritePolicy": "Manual",
    "DateTime": "<%= dateTime %>",
    "LifeCycleEventOnTaskStateChange": false,
    "ServiceEnabled": true,
    "Status": {},
    "Tasks": {
        "@odata.id": "<%= basepath %>/TaskService/Tasks%>"
    }
}

Remove elements in JSON file to satisfy validator
Remove elements in JSON file to satisfy validator
