Home > Net >  Deserializing JSON array with many attachments C#
Deserializing JSON array with many attachments C#

Time:02-10

How to deserialize a JSON array of this type using Newtonsoft.Json ?

"events":{
       "69":{
           "2":{
              "4":{
                  "value":
                          "1":
                          "N":
                  "kind": 0

Keys are an array: 69,2,4, value is also an array It was possible to get the first key of the array, then there are problems

public class JSON_Deserialize
{
    public Dictionary<int, Value> events { get; set; }
}

I don’t understand what exactly to write in the Value class

public class Value
{
    public string value { get; set; }
}

CodePudding user response:

Hey you can use this website to convert your whole json string into c# classes that you can then use in your project https://json2csharp.com/

  •  Tags:  
  • Related