title: import JSON file to MS SQL server
body: <p>I make an API call to a URL using C# and it returns JSon response and i download the json file.</p>
  
  <p>i would like to write the json data to database for use by a web application.
  how can i import the json file into sql or write it direct from my c# program to db . am using sql 2016</p>
  
  <p>My JSon file looks as follows :</p>
  
  <pre><code>{
  
      "Items": [
      {
          "LocalTimestamp": "2017-07-05T18:59:29+02:00",
          "Id": 653914348,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.90225,
              -26.07706
          ]
      },
      {
          "LocalTimestamp": "2017-07-05T08:41:08+02:00",
          "Id": 653709051,
          "Description": "Trip Startup",
          "Processed": false,
          "Position": [
              27.90229,
              -26.07753
          ]
      },
      {
          "LocalTimestamp": "2017-07-05T07:42:19+02:00",
          "Id": 653692142,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.90228,
              -26.07708
          ]
      },
      {
          "LocalTimestamp": "2017-07-05T07:21:47+02:00",
          "Id": 653683088,
          "Description": "Trip Startup",
          "Processed": false,
          "Position": [
              27.9222,
              -26.04318
          ]
      },
      {
          "LocalTimestamp": "2017-07-05T07:21:00+02:00",
          "Id": 653682830,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.92348,
              -26.04612
          ]
      },
      {
          "LocalTimestamp": "2017-07-04T10:15:35+02:00",
          "Id": 653330923,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.997,
              -26.05747
          ]
      },
      {
          "LocalTimestamp": "2017-07-04T09:41:19+02:00",
          "Id": 653320268,
          "Description": "Trip Startup",
          "Processed": false,
          "Position": [
              28.02899,
              -26.20546
          ]
      },
      {
          "LocalTimestamp": "2017-07-04T09:32:54+02:00",
          "Id": 653317769,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              28.0293,
              -26.20549
          ]
      },
      {
          "LocalTimestamp": "2017-07-03T18:40:43+02:00",
          "Id": 653089737,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.90228,
              -26.07707
          ]
      },
      {
          "LocalTimestamp": "2017-07-03T18:29:01+02:00",
          "Id": 653086470,
          "Description": "Trip Startup",
          "Processed": false,
          "Position": [
              27.94599,
              -26.07828
          ]
      },
      {
          "LocalTimestamp": "2017-07-03T18:26:30+02:00",
          "Id": 653085810,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.94662,
              -26.07807
          ]
      },
      {
          "LocalTimestamp": "2017-07-03T18:15:50+02:00",
          "Id": 653082613,
          "Description": "Trip Startup",
          "Processed": false,
          "Position": [
              27.98847,
              -26.05269
          ]
      },
      {
          "LocalTimestamp": "2017-07-03T18:13:15+02:00",
          "Id": 653082018,
          "Description": "Trip Shutdown",
          "Processed": false,
          "Position": [
              27.99036,
              -26.05341
          ]
      }
   ],
   "HasMoreResults": false
  }
  </code></pre>