Support JSON and arrays in JavaScript action in Mistral
Change-Id: Idf96c720d791a421be99e8c42c1eb0d6c1dc1afb Closes-Bug: 1498406
This commit is contained in:
parent
0f140c7b96
commit
6b36bdff83
@ -44,7 +44,8 @@ class V8Evaluator(JSEvaluator):
|
|||||||
# Prepare data context and way for interaction with it.
|
# Prepare data context and way for interaction with it.
|
||||||
ctx.eval('$ = %s' % json.dumps(context))
|
ctx.eval('$ = %s' % json.dumps(context))
|
||||||
|
|
||||||
return ctx.eval(script)
|
result = ctx.eval(script)
|
||||||
|
return _PYV8.convert(result)
|
||||||
|
|
||||||
# TODO(nmakhotkin) Make it configurable.
|
# TODO(nmakhotkin) Make it configurable.
|
||||||
EVALUATOR = V8Evaluator
|
EVALUATOR = V8Evaluator
|
||||||
|
Loading…
Reference in New Issue
Block a user