I am doing something like this
string tag_prop = "foo_bar";
string guid = "ABC";
string str = JsonConvert.SerializeObject(new { tags = new { tag_prop = guid } });
I noticed that I get the following JSON string.
{
tags : {
tag_prop : "ABC"
}
}
My question is how can I tell the above statement that tag_prop is actually a variable and get this
{
tags : {
foo_bar: "ABC"
}
}