Using C# (.Net 4.6) and JSON.NET
I'm currently trying to deserialize a large JSON string that has been presented in a format with multiple levels - I'm aiming to store some of this data in a flat DB table, going via a C# class to build the data in the required format that will be written back to each row.
Here's an example of the string format (made up data with line breaks added to increase readability):
{
"Microsoft":
{
"name" : "Microsoft",
"products" : ["Word", "Excel", ["TestThis","TestOrThis"]],
"employees" :
[
{"John" :{"name" : "John","skills" : ["Support", "Programming"]}},
{"Dave":{"name" : "Dave", "skills" : ["Tester"]}}
]
}
}
What I really want to end up with is a database row that has just some of this information, reading something like:
"Company Name", "Employee Name"
e.g.
"Microsoft", "John"
"Microsoft", "Dave"
"IBM", "Ted"
Reading a basic JSON string is easy enough, however I'm new to using JSON which has left me stumped on how to break this down.