I am facing very strange problem where the response of my .net core web api ommits the nested array beyond level one.
So I am trying to return this structure from my api
var response = new FormHierarchyResponse()
{
FormTitle = "First level",
Children = new List<FormDefinitionResponse>(){
new FormHierarchyResponse() {
FormTitle="Second Level",
Children={
new FormDefinitionResponse() {
FormTitle="Third Level"
}
}
}
}
};
This is a hierarichal structure which has root, first and second level but I never receive any level beyond second level. So this is the output I receive
{
"children": [
{
"formDefinitionId": 0,
"formTitle": "Second Level",
"parentFormDefinitionId": null,
"warnings": 0,
"errors": 0,
"commentsCount": 0
}
],
"formDefinitionId": 0,
"formTitle": "First level",
"parentFormDefinitionId": null,
"warnings": 0,
"errors": 0,
"commentsCount": 0
}
You can see the Second Level
children does not even have the children
property.
Any idea what is going on here?