I am struggling to build a complex JSON object this is what I want:
{"name": [ "failed","complete"], "data": ["failed":[1, 2, 3], "completed": [1, 2, 3]}
I want to convert this in a C# class as a property. There must be a connection with the failed property and the list of int. The output must be:
failed: 1, 2, 3 complete: 1,2 ,3
What is the correct syntax of a JSON object like this? And how can I declare a property of this object in c#?
I was thinking about dictionaries but maybe there is a better way?
Kind regards
], in Visual Studio: Edit -> Paste Special -> Paste as JSON Classes.{"name": [ "failed","complete"], "data": ["failed":[1, 2, 3], "completed": [1, 2, 3]]}datais an array of objects, you need{ "name": [ "failed", "complete" ], "data": [ { "failed": [ ... ], "completed": [ ... ] } ] }, ifdatais a single object,{ "name": [ "failed", "complete" ], "data": { "failed": [ ... ], "completed": [ ... ] } }