install-package newtonsoft.json
Console.WriteLine(JObject.FromObject(new
{
    a = 0,
    b = 42,
    c = new
    {
        Value = 233
    }
}));

OUTPUT

{
  "a": 0,
  "b": 42,
  "c": {
    "Value": 233
  }
}

_CRY
1.2k 声望24 粉丝

How dare we sit quietly