I want to use Newtonsoft JSON.Net to save & load program settings in a file.
I want the structure of the file to be like:
I can create a JObject as follows, but it doesn't have the top level node:Code:Settings Setting1:value Setting2:value Setting3:value
I can't for the life of me figure out how to add the top level "Settings" node in the JObject declaration.Code:Dim settings As JObject = New JObject From { {"Setting1", 5}, {"Setting2", 10}, {"Setting3", 15} }
In tried:
Basically I want the various settings to be under a Settings node. I could not find any examples in the documentation that shows how to do this. Hoping someone can help me out. Thanks...Code:Dim setting As JObject = New JObject From { {"Settings", {"Setting1", 5}, {"Setting2", 10}, {"Setting3", 15} }}




Reply With Quote