Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
[Fork] https://stackoverflow.com/questions/62079961/why-does-jsonconvert-treat-default-constructors-and-other-constructors-inherentl by dbc_MinLength
Environment version: .NET 9.0.0 (9.0.0)
Newtonsoft.Json version: Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

{
  "scenarios": [
    {
      "$id": "1"
    },
    {
      "$id": "2"
    },
    {
      "$id": "3"
    }
  ],
  "SerializedDict": [
    {
      "Key": {
        "$ref": "1"
      },
      "Value": 0.0
    },
    {
      "Key": {
        "$ref": "2"
      },
      "Value": 1.0
    },
    {
      "Key": {
        "$ref": "3"
      },
      "Value": 2.0
    }
  ]
}
Deserialized ReferenceTesting:
scenario0 
scenario1 
scenario2 
Key: Scenario, Value: 0 
Key: Scenario, Value: 1 
Key: Scenario, Value: 2 
Cached Result
Last Run: 10:41:20 pm
Compile: 0.034s
Execute: 0.22s
Memory: 17.80Mb
CPU: 0.254s