title: Serialise list of objects to single JSON object, with property as key:value
body: <pre><code>Public Class Doc
  
      Public TypeDoc As String = &quot;&quot;
      Public Property UserFields As New List(Of UserField)
  
  End Class
  
  Public Class UserField
      Property Name As String = &quot;&quot;
      Property Value As String = &quot;&quot;
  End Class
  
  Public Class Example
  
      Public Sub test()
          Dim d As New Doc
          d.TypeDoc = &quot;Order&quot;
          d.UserFields.Add(New UserField With {.Name = &quot;U_Name&quot;, .Value = &quot;Jonny&quot;})
          d.UserFields.Add(New UserField With {.Name = &quot;U_Surname&quot;, .Value = &quot;Goodman&quot;})
  
          Dim Ret As String = JsonConvert.SerializeObject(d)
  
      End Sub
  
  End Class
  </code></pre>
  <p>Desired result &quot;Ret&quot;:</p>
  <pre><code>{
    &quot;TypeDoc&quot;: &quot;Order&quot;,
    &quot;U_Name&quot;: &quot;Jonny&quot;,
    &quot;U_Surname&quot;: &quot;Goodman&quot;,
  }
  </code></pre>
  <p>I hope you understand the example, I was wondering if it was possible to have this result.
  Thank you</p>