GetRootItem

Description

Gets the handle of the root item.

Applies to

JSONParser objects

Syntax

objectname.GetRootItem ( )

Argument

Description

objectname

The name of the JSONParser object whose root item you want to obtain.


Return value

Long.

Returns the handle of the root item if it succeeds and null value if an error occurs. If any argument's value is null, the method returns null.

Examples

String ls_Error, ls_Json
JsonParser lnv_JsonParser
Long ll_RootObject
lnv_JsonParser = Create JsonParser

ls_Json = '{"id":1, "name":"evan1", "birthday":2340323884}'
ls_Error = lnv_JsonParser.LoadString(ls_Json)
if Len(ls_Error) > 0 then
 MessageBox("Error", ls_Error)
else
 ll_RootObject = lnv_JsonParser.GetRootItem()
end if

See also

GetItemArray

GetItemBlob

GetItemBoolean

GetItemDate

GetItemDateTime

GetItemNumber

GetItemObject

GetItemString

GetItemTime

GetItemType