Support JSON and arrays in JavaScript action in Mistral

Change-Id: Idf96c720d791a421be99e8c42c1eb0d6c1dc1afb
Closes-Bug: 1498406
This commit is contained in:
Michal Gershenzon 2015-09-24 23:35:29 +00:00
parent 0f140c7b96
commit 6b36bdff83

View File

@ -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