Yo Guys,
I'm currently trying to pass some mixed JSON, and was wondering if it was possible to do anything like the following?
struct example_data
{
public Dictionary<string, List<string>> information {get; set;}
}
class TestClass
{
static void Main(string[] args)
{
string test_string = @"{'EventSpecificInformation':
{
'measure':''
,'Long name':'test_name'
,'Short name':'test_s_name'
,'Description':''
,'Status':'Real (Imported)'
,'Viewers':['Everyone']
,'Modifiers':['Supervisor only']
,'calculation':''
}
}"
example_data deserialized_entry = JsonConvert.DeserializeObject<example_data>(test_string)
}
}
As you would expect the above code snippet fails, but I was hoping I could avoid wrapping each JSON entry in a JSON array or having to create a custom JSON reader in C#.
Any advice on the matter would be greatly appreciated.