I have JSON which looks like:
{
"name": "foo",
"settings": {
"setting1": true,
"setting2": 1
}
}
I know how to use json2csharp.com to create the C# classes to deserialize this. They looks like:
public class Settings
{
public bool settings1 { get; set; }
public int settings2 { get; set; }
}
public class RootObject
{
public string name { get; set; }
public Settings settings { get; set; }
}
but what I want is to simply deserialize it into
public class RootObject
{
public string name { get; set; }
public string settings { get; set; }
}
i.e., all of the "setting" JSON just needs to be saved as a string--the structure of that JSON is not consistent. How can that be done? Thanks!