title: How do I populate a JSON array with values (not pairs) in Delphi?
body: <p>I'm trying to create JSON that looks like this:</p>
  
  <pre><code>{ "guestlist": ["alice","bob","charlie"] }
  </code></pre>
  
  <p>Typical examples I see for populating a JSON array look like this:</p>
  
  <pre><code>var 
    jsobj: TJsonObject;      
    jso : TJsonObject;      
    jsa : TJsonArray;
    jsp : TJsonPair;
  
  begin
      jsObj := TJsonObject.Create();
      jsa := TJsonArray.Create();
      jsp := TJSONPair.Create('guestlist', jsa);
      jsObj.AddPair(jsp);
  
      jso := TJsonObject.Create();
      jso.AddPair(TJSONPair.Create('person', 'alice'));
      jsa.AddElement(jso);
  
      jso := TJsonObject.Create();
      jso.AddPair(TJSONPair.Create('person', 'bob'));
      jsa.AddElement(jso);
  
      jso := TJsonObject.Create();
      jso.AddPair(TJSONPair.Create('person', 'charlie'));
      jsa.AddElement(jso);
  end;
  </code></pre>
  
  <p>But that would result in something like this:</p>
  
  <pre><code>{ "guestlist": [{"person":"alice"},{"person":"bob"},{"person":"charlie"}] }
  </code></pre>
  
  <p>How can I add a single value to the array instead of a pair? I see nothing in the documentation for <code>TJsonObject</code> on how to do this,</p>