I have a swagger doc json file and I would like to convert it to an
Dictionary<string,dynamic>
with key being the property name and value can be another dictionnary of type Dictionary<string,dynamic>
until the value is a primitive, not a json object.
I started with var dic = JSonObject.Parse("file.json").Properties().ToDictionary(p=>p.Name, p => p.Value);
How to recursively test and convert p.Value to dictionnary when the value is not a primitive type?