title: Mqtt publishing/payload doesn't show up from JSON
body: <p>I have a form and I want to publish the message from the JSON part. but I get this error: <code>Additional information: Cannot deserialize the current JSON object</code> (e.g. <code>{"name":"value"})</code> into type <code>System.Collections.Generic.List1[WindowsFormsApplication1.Form2+jsonlist]</code> because the type requires a JSON array (e.g. <code>[1,2,3]</code>) to deserialize correctly.</p>
  
  <p>To fix this error either change the JSON to a JSON array (e.g. <code>[1,2,3]</code>) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or <code>List&lt;T&gt;</code>) that can be deserialized from a JSON object. <code>JsonObjectAttribute</code> can also be added to the type to force it to deserialize from a JSON object.</p>
  
  <p>Path 'html', line 1, position 8.</p>
  
  <p>Code:</p>
  
  <pre><code>    static void client_MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e)
      {
  
          Console.WriteLine(e.Message);
          Console.WriteLine(System.Text.Encoding.Default.GetString(e.Message));
  
  
          var json5 = System.Text.Encoding.Default.GetString(e.Message);
          List&lt;jsonlist&gt; jsons = JsonConvert.DeserializeObject&lt;List&lt;jsonlist&gt;&gt;(json5);
  
          foreach (jsonlist dets2 in jsons)
          {
              Console.WriteLine(dets2.plaintext);
          }
      }
  
      private void Form2_Load(object sender, EventArgs e)
      {
  
          MqttClient client = new MqttClient(IPAddress.Parse("85.17.193.165"));
          client.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
  
          string clientId = Guid.NewGuid().ToString();
          client.Connect(clientId);
  
          Console.WriteLine("isconn:" + client.IsConnected);
  
          client.Subscribe(new string[] { "/doorbell/listen" }, new byte[] { MqttMsgBase.QOS_LEVEL_AT_MOST_ONCE  });
      }
  </code></pre>
  
  <p>class : </p>
  
  <pre><code>    public class jsonlist
      {
  
          public string plaintext { get; set; }
          public string link { get; set; }
  
      }
  </code></pre>