I have to serialize a list of objects in Json in C#, I'm using Newtonsoft.Json I need to use the name value of the objects as the root name, like this:
"employees" :
{
"John" :
{
"id" : 18,
"email" : "[email protected]"
},
"Jack" :
{
"id" : 21,
"email" : "[email protected]"
}
}
Where John and Jack are the values of the name property for my employees