我在C#中有一个json对象(表示为Newtonsoft.Json.Linq.JObject对象),我需要将其展平到字典.让我举一个例子来说明我的意思:
{
"name": "test",
"father": {
"name": "test2"
"age": 13,
"dog": {
"color": "brown"
}
}
}
This should yield a dictionary with the following key-value-pairs:
["name"] == "test",
["father.name"] == "test2",
["father.age"] == 13,
["father.dog.color"] == "brown"
我该怎么做?