DataFlex
DataFlex
Create JSON Array of Strings
See more JSON Examples
Demonstrates how to create a JSON array of strings.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoJarr
Boolean iSuccess
String sTemp1
// The goal of this example is to produce this:
// [
// "tag1",
// "tag2",
// "tag3"
// ]
Get Create (RefClass(cComChilkatJsonArray)) To hoJarr
If (Not(IsComObjectCreated(hoJarr))) Begin
Send CreateComObject of hoJarr
End
Get ComAddStringAt Of hoJarr -1 "tag1" To iSuccess
Get ComAddStringAt Of hoJarr -1 "tag2" To iSuccess
Get ComAddStringAt Of hoJarr -1 "tag3" To iSuccess
Set ComEmitCompact Of hoJarr To False
Get ComEmit Of hoJarr To sTemp1
Showln sTemp1
End_Procedure