CreateJsonObject

Description

Creates the object of JsonObjectItem type as root item to initialize instance.

Applies to

JSONGenerator objects

Syntax

objectname.CreateJsonObject ( )

Argument

Description

objectname

Reference to the JSONGenerator object instance.


Return value

Long.

Returns the root item handle if it succeeds and -1 if an error occurs.

Examples

This example creates the JSON root item of object type:

JsonGenerator lnv_JsonGenerator
Long ll_RootObject
lnv_JsonGenerator = Create JsonGenerator

ll_RootObject = lnv_JsonGenerator.CreateJsonObject()
if ll_RootObject <> -1 then
  ...
end if

See also

CreateJsonArray