Closed
Description
Related to: #47
I get the following response when attempting to to serialize a RuleResult (i.e. using express's res.json(ruleResult)
method).
"{\"conditions\":{\"priority\":1,\"all\":[{\"priority\":1,\"any\":[{\"priority\":1,\"any\":[{\"operator\":\"in\",\"value\":[\"foo\",\"bar\",\"baz\"],\"fact\":\"productType\",\"factResult\":\"baz\",\"result\":true}...
As a workaround, I've done JSON.parse(JSON.stringify(ruleResult));
can we either:
- have them serialize properly
- add a
.toJSON()
method?