T
T
Test Test2015-05-29 09:59:53
Telephony
Test Test, 2015-05-29 09:59:53

How to include JSON.parse in a script in voximplant?

Good afternoon. There is a script on Voximlant:

...

function handleHttpConfigure(e) {
  data = JSON.parse(e);
  
  if(data.error == 2000) {
    Logger.write("Error get configure");
    terminate();
  } else {
    Logger.write("Set configure");
    configure = data.data;
  }
}

//Started
VoxEngine.addEventListener(AppEvents.Started, function(e) {
  Logger.write('Started.');
  Net.httpRequest(setting.url+api.configure.method+"?sk="+setting.sk, handleHttpConfigure);
});

...

When debugging, the console complains that it cannot find JSON.parse. How to be? Or are there any alternatives?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
z0rgoyok, 2015-05-29
@z0rgoyok

Ask those. support, they are very responsive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question