![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java JavaScript 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
(PowerBuilder) Example: JsonObject.NewArrayOf methodSee more JSON ExamplesDemonstrates theNewArrayOf method.Note: This example requires Chilkat v11.4.0 or greater.
integer li_rc integer li_Success string ls_Big_cats oleobject loo_Json li_Success = 0 ls_Big_cats = "[~"lion~",~"tiger~",~"leopard~",~"jaguar~",~"cheetah~",~"snow leopard~",~"clouded leopard~",~"cougar~",~"puma~",~"panther~"]" loo_Json = create oleobject li_rc = loo_Json.ConnectToNewObject("Chilkat.JsonObject") if li_rc < 0 then destroy loo_Json MessageBox("Error","Connecting to COM object failed") return end if loo_Json.UpdateString("test","abc") li_Success = loo_Json.NewArrayOf("big_cats",ls_Big_cats) if li_Success = 0 then Write-Debug loo_Json.LastErrorText destroy loo_Json return end if loo_Json.EmitCompact = 0 Write-Debug loo_Json.Emit() // Result: // { // "test": "abc", // "big_cats": [ // "lion", // "tiger", // "leopard", // "jaguar", // "cheetah", // "snow leopard", // "clouded leopard", // "cougar", // "puma", // "panther" // ] // } destroy loo_Json |
||||
© 2000-2026 Chilkat Software, Inc. All Rights Reserved.