title: How Deserialize JSON in C#
body: <p>I would like to retrieve data from a restful web service in order to save this data into an <code>object</code>. The data retrieval works in principal and the JSON string can be shown in a text box. However, I struggle making the data usable in C# - after some research and own programming, I still get errors when <code>deserialising</code> that I am not able to fix:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  using Newtonsoft;
  using System.IO;
  using System.Net;
  
  namespace Datenbankabfrage
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void btnGet_Click(object sender, EventArgs e)
          {
  
              // Create a request for the URL. 
              WebRequest request = WebRequest.Create(
                "URL");
              // Get the response.
              WebResponse response = request.GetResponse();
              // Get the stream containing content returned by the server.
              Stream dataStream = response.GetResponseStream();
              // Open the stream using a StreamReader for easy access.
              StreamReader reader = new StreamReader(dataStream);
              // Read the content.
              string responseFromServer = reader.ReadToEnd();
  
              Artikel ErsterA = new Artikel();
  
              Newtonsoft.Json.JsonConvert.PopulateObject(responseFromServer, ErsterA);
  
              //txtAusgabeAA.Text = responseFromServer;
              reader.Close();
              response.Close();
          }
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/AY3lZ.png" rel="nofollow noreferrer">Here a picture of the error massage</a>, which states:</p>
  
  <blockquote>
    <p>An unhandled exception of type
    'Newtonsoft.Json.JsonSerializationException` occurred in
    Newtonsoft.Json.dll</p>
    
    <p>Additional information: Cannot populate JSON array onto type
    'Datenbankabfrage.Artikel'.  Path ", line 1, position 1.</p>
  </blockquote>
  
  <p>Any help is appreciated!</p>