Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
Question41748817 deserialize-json-into-datatable-in-vb-net-using-jsonconvert by dbc_MinLength
Json.NET version: Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

Input JSON: 
[
  {
    "PhoneNo": "123456789",
    "ID": "46541",
    "Name": "John Doe",
    "Email": "hello@there"
  },
  {
    "PhoneNo": "8675309",
    "ID": "1234",
    "Name": "Alice Bob",
    "Email": "goodbye@here"
  },
  {
    "PhoneNo": null,
    "ID": "0001",
    "Name": "No Phone",
    "Email": "no@email.either"
  }
]
Deserialized DataTable columns: 
[
  "PhoneNo: System.Int64",
  "ID: System.Int64",
  "Name: System.String",
  "Email: System.String"
]
Deserialized and reserialized JSON: 
[
  {
    "PhoneNo": 123456789,
    "ID": 46541,
    "Name": "John Doe",
    "Email": "hello@there"
  },
  {
    "PhoneNo": 8675309,
    "ID": 1234,
    "Name": "Alice Bob",
    "Email": "goodbye@here"
  },
  {
    "PhoneNo": null,
    "ID": 1,
    "Name": "No Phone",
    "Email": "no@email.either"
  }
]
Cached Result
Last Run: 3:06:38 am
Compile: 0.611s
Execute: 0.361s
Memory: 1.19Mb
CPU: 0.375s