Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) 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
Use ChilkatAx-win32.pkg Procedure Test Handle hoJson Boolean iSuccess Variant vSt Handle hoSt String sTemp1 Get Create (RefClass(cComChilkatJsonObject)) To hoJson If (Not(IsComObjectCreated(hoJson))) Begin Send CreateComObject of hoJson End Set ComEmitCompact Of hoJson To False Get ComAppendString Of hoJson "abc" "123" To iSuccess Get Create (RefClass(cComChilkatStringTable)) To hoSt If (Not(IsComObjectCreated(hoSt))) Begin Send CreateComObject of hoSt End Get ComAppend Of hoSt "a" To iSuccess Get ComAppend Of hoSt "b" To iSuccess Get ComAppend Of hoSt "c" To iSuccess Get ComAppend Of hoSt "d" To iSuccess Get pvComObject of hoSt to vSt Get ComAppendStringArray Of hoJson "strArray" vSt To iSuccess Get ComEmit Of hoJson To sTemp1 Showln sTemp1 // Output: // { // "abc": "123", // "strArray": [ // "a", // "b", // "c", // "d" // ] // } End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.