Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
[Fork] Sort by Contcont
Environment version: 4.0.30319.42000
Json.NET version: Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed


Testing conversion of Question49898782.KeyList to System.Data.DataTable.
Input JSON: 
{ "ssid" : 1, 
  "dim" : 2,
  "type" : 3,
  "list_of_business_keys":
  [
      {"business_key" : {"column_1" : 100, "column_2" : 1000}},
      {"business_key" : {"column_1" : 200, "column_2" : 1000}},
      {"business_key" : {"column_1" : 300, "column_2" : 1000}},
      {"business_key" : {"column_1" : 400, "column_2" : 1000}},
      {"business_key" : {"column_1" : 500, "column_2" : 1000}}
  ]
}
Output System.Data.DataTable:
[
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "column_1": 100,
    "column_2": 1000
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "column_1": 200,
    "column_2": 1000
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "column_1": 300,
    "column_2": 1000
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "column_1": 400,
    "column_2": 1000
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "column_1": 500,
    "column_2": 1000
  }
]

Testing conversion of Question49898782.KeyList to System.Data.DataTable.
Input JSON: 
{ "ssid" : 1, 
  "dim" : 2,
  "type" : 3,
  "list_of_business_keys":
  [
      {"business_key" : {"xxx" : "abc", "yyy" : 1000, "zzz" : 123}},
      {"business_key" : {"xxx" : "cde", "yyy" : 1000, "zzz" : 456}},
      {"business_key" : {"xxx" : "efg", "yyy" : 1000, "zzz" : 789}},
      {"business_key" : {"xxx" : "hij", "yyy" : 1000, "zzz" : 12 }},
      {"business_key" : {"xxx" : "klm", "yyy" : 1000, "zzz" : 345}}
  ]
}
Output System.Data.DataTable:
[
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "abc",
    "yyy": 1000,
    "zzz": 123
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "cde",
    "yyy": 1000,
    "zzz": 456
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "efg",
    "yyy": 1000,
    "zzz": 789
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "hij",
    "yyy": 1000,
    "zzz": 12
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "klm",
    "yyy": 1000,
    "zzz": 345
  }
]

Testing conversion of Question49898782.KeyList to System.Data.DataTable.
Input JSON: 
{ "ssid" : 1, 
  "dim" : 2,
  "type" : 3,
  "list_of_business_keys":
  [
      {"business_key" : {"xxx" : null, "yyy" : 1000, "zzz" : 123}},
      {"business_key" : {"xxx" : "row contains string-value cell that was initially null", "yyy" : 1000, "zzz" : 456}},
      {"business_key" : {"xxx" : "efg", "yyy" : 1000, "zzz" : 789}},
      {"business_key" : {"xxx" : "row contains floating point cell that was initially integral", "yyy" : 1000, "zzz" : 12.123 }},
      {"business_key" : {"added_property" : "added_value", "xxx" : "row contains string-valued cell that was initially integral", "yyy" : "1000", "zzz" : 345 }}
  ]
}
Output System.Data.DataTable:
[
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": null,
    "yyy": "1000",
    "zzz": 123.0,
    "added_property": null
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "row contains string-value cell that was initially null",
    "yyy": "1000",
    "zzz": 456.0,
    "added_property": null
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "efg",
    "yyy": "1000",
    "zzz": 789.0,
    "added_property": null
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "row contains floating point cell that was initially integral",
    "yyy": "1000",
    "zzz": 12.123,
    "added_property": null
  },
  {
    "ssid": 1,
    "dim": 2,
    "type": 3,
    "xxx": "row contains string-valued cell that was initially integral",
    "yyy": "1000",
    "zzz": 345.0,
    "added_property": "added_value"
  }
]

Done.
Cached Result
Last Run: 8:47:01 am
Compile: 0.269s
Execute: 0.33s
Memory: 1.65Mb
CPU: 0.438s