Hi! I need to parse/stringify JSON in WF. But built-in functions at
least -ScriptVault.JSON.parse- works quiet unstable. For example it
returns -null- when it gets an empty javascirpt array. So the code as
follows return null:

var arrStr = "[]";
ScriptVault.JSON.parse(arrStr); // --> returns null, but must return an empty array

Also sometimes it throws errors and the next time doesn't with the same
code and object.
The error message might look as follows:

2016-01-19 17:41:09,988 INFO [STDOUT] (pool-27-thread-1) ERROR [RBPM] [com.novell.soa.af.impl.activity.ActivityNode:handl eException] Error Evaluating Script Error Evaluating Script com.novell.soa.script.mozilla.javascript.EcmaError : SyntaxError: syntax error (#487(eval)#1)


It seems there is a native Rhino class to parse/stringify JSON -
Packages.org.mozilla.javascript.NativeJSON. But for some reasons in the
WF it looks like it doesn't has any properties/methods.
So is there reliable way to parse/stringify JSON in WF?

hello_amigo's Profile: https://forums.netiq.com/member.php?userid=211
View this thread: https://forums.netiq.com/showthread.php?t=55159