NetXMS Support Forum

English Support => General Support => Topic started by: Mishal on August 03, 2021, 10:09:55 AM

Title: NetXMS version:3.9 NXSL JsonObject class constructor method doesn't work
Post by: Mishal on August 03, 2021, 10:09:55 AM
I'm trying to use the JsonObject class from NXSL but it is failing when I call the constructor method with the following error: function not found error.

I'm using NetXMS version 3.9.
would appreciate if some one can direct me in the right direction as to how to resolve this issue.
My code to calling the constructor
body = JsonObject();
Title: Re: NetXMS version:3.9 NXSL JsonObject class constructor method doesn't work
Post by: Mishal on August 03, 2021, 10:13:06 AM
Apologies.
I've been calling the constructor incorrectly.

For anyone else who come's across this issue to call constructor you have to use new.
Like below
body = new JsonObject();