Issue with returning JArray from Azure Functions HttpTrigger

Viewed 463

I'm trying to return JArray object from Azure Function of HttpTrigger type:

JArray a = JArray.Parse("[{\"reportId\": \"1111\",\"reportName\": \"AAAA\"}]");
return req.CreateResponse(HttpStatusCode.OK, a);

However, for some reason, the response body returned as:

[{"reportId":[],"reportName":[]}]

What am I doing wrong?

2 Answers
Related