Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
questions/43145603/json-data-not-converting-to-list by dbc_MinLength
Environment version: 4.0.30319.42000
Json.NET version: Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

Initial JSON: 
{"channels": {
    "heart-rate": {
        "events": {
            "$type": "System.Collections.Generic.List`1[[Project.Model.Activity+Channel+Event, Project]], mscorlib",
            "$values": [{
                    "$type": "Project.Model.ChannelEvents.HeartRateChannelEvent, Project",
                    "beatsPerMinute": 40,
                    "offset": 0,
                    "Date": "2017-03-31T00:00:00.00-04:00",
                },null,{
                    "$type": "Project.Model.ChannelEvents.HeartRateChannelEvent, Project",
                    "beatsPerMinute": 40,
                    "offset": 0,
                    "Date": "2017-03-31T00:00:00-04:00",
                }
            ]
        }
    },
    "location": {
        "events": {
            "$type": "System.Collections.Generic.List`1[[Project.Model.Activity+Channel+Event, Project]], mscorlib",
            "$values": [{
                    "$type": "Project.Model.ChannelEvents.LocationChannelEvent, Project",
                    "latitude": 0.0,
                    "longitude": 0.0,
                    "offset": 0
                }
            ]
        }
    }
}}
Output JSON: 
{
  "channels": {
    "heart-rate": {
      "events": {
        "type": "Project.Model.ChannelEvents.HeartRateChannelEvent, Project, Version=1.2.7.0, Culture=neutral, PublicKeyToken=null",
        "structure": [
          "beatsPerMinute",
          "offset",
          "Date"
        ],
        "list": [
          [
            40,
            0,
            "2017-03-31T00:00:00.00-04:00"
          ],
          null,
          [
            40,
            0,
            "2017-03-31T00:00:00-04:00"
          ]
        ]
      }
    },
    "location": {
      "events": {
        "type": "Project.Model.ChannelEvents.LocationChannelEvent, Project, Version=1.2.7.0, Culture=neutral, PublicKeyToken=null",
        "structure": [
          "latitude",
          "longitude",
          "offset"
        ],
        "list": [
          [
            0.0,
            0.0,
            0
          ]
        ]
      }
    }
  }
}
Output JSON and expected JSON are equivalent.
Cached Result
Last Run: 4:48:32 am
Compile: 0.299s
Execute: 0.204s
Memory: 1.30Mb
CPU: 0.234s