I am playing with Azure Functions. However, I feel like I\'m stumped on something pretty simple. I\'m trying to figure out how to return some basic JSON. I\'m not sure how to cr
I had a similar issue and this seemed to be the most popular post with no answer. After figuring what node does the below should work and give you exactly what you are after. The other examples still returns a string representation wheres this will return JSON.
Remember to declare using System.Text; and also add:
return JsonConvert.SerializeObject(person);
to the GetJson function as per Juunas response.
return new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent(GetJson(), Encoding.UTF8, "application/json")
};