Is it possible to do the following:
I have a class:
public class Customer
{
public Csutomer()
{
}
public string Name { get; set; }
}
and then I instantiate the class:
Customer cust = new Customer();
cust.Name = "Jhon Smith";
string result = JsonConvert.SerializeObject(cust);
and the result will contain:
{"Name":"Jhon Smith"}
I need to get json like this, pay attention to the dot .in front of the name.Name
{".Name":"Jhon Smith"}
And after that, to parse Json on my object.
source
share