'Return Multiline Response in ASP .net Core API(JSON format)

I am creating a new .Net API(using .net core) and trying to return JSON data in multiline. e.g. [{"ID":"1"},{"ID":"2"},{"ID":"3"}] //Current Output

**The expected output should be like.

[{"ID":"1"},    
{"ID":"2"},    
{"ID":"3"}]

Below is my web api code and my return type is Object.

var Response = await idc.GetActualData(clientID, tempId, dt, data);//DB call
responseStr = JsonConvert.SerializeObject(Response);
return responseStr;



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source