Supposing I have this object:
var user = new User() { name = "John" };
When I am trying to send this object as Json to an web server using this code:
HttpResponseMessage response = await client.PostAsJsonAsync(url, user);
this is the json that is sent:
{name:"John"}
I would want to insert a root node. The Json should look like this:
{user:{name:"John"}
I found a solution, but it was only for web apps. Any ideas for desktop apps?