|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (Delphi DLL) JSON Append String ArrayDemonstrates how to append an array of strings from a string table object. Note: This example uses the AppendStringTable method, which was introduced in Chilkat v9.5.0.67 
 uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, JsonObject, StringTable; ... procedure TForm1.Button1Click(Sender: TObject); var json: HCkJsonObject; st: HCkStringTable; begin json := CkJsonObject_Create(); CkJsonObject_putEmitCompact(json,False); CkJsonObject_AppendString(json,'abc','123'); st := CkStringTable_Create(); CkStringTable_Append(st,'a'); CkStringTable_Append(st,'b'); CkStringTable_Append(st,'c'); CkStringTable_Append(st,'d'); CkJsonObject_AppendStringArray(json,'strArray',st); Memo1.Lines.Add(CkJsonObject__emit(json)); // Output: // { // "abc": "123", // "strArray": [ // "a", // "b", // "c", // "d" // ] // } CkJsonObject_Dispose(json); CkStringTable_Dispose(st); end; | ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.