How do I…
Convert a variable to JSON in JavaScript code. (extension to be precise)
I have an extension parameter called Data
which is a structure variable.
In the code, the expected and working is structure variable (an object variable outside of GDevelop).
So I used an argument for a structure variable parameter… something like this:
Simply nothing happens on the server, and this message appears in the debugger:
I know that the “ToJSON” expression can be used in standard events but I haven’t found a function with the same name for JavaScript. (I checked the documentation, wiki and forums)
I know this error may seem silly. But the more silly it is, the faster someone answers.