You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to reproduce this problem - perhaps this is no longer a problem due to rule-result now having a toJSON() method defined?
conststringified=JSON.stringify(ruleResult)console.log(stringified)// no double escaping:// {"conditions":{"priority":1,"any":[{"operator":"greaterThanInclusive","value":21,"fact":"age","factResult":21,"result":true},{"operator":"equal","value":true,"fact":"qualified","factResult":false,"result":false}]},"event":{"type":"setDrinkingFlag","params":{"canOrderDrinks":true}},"priority":100,"result":true}
I checked the express source code and they're not doing anything fancy - just JSON.stringify()
If anyone still has this problem please comment and we'll re-open. Thanks!
Uh oh!
There was an error while loading. Please reload this page.
Related to: #47
I get the following response when attempting to to serialize a RuleResult (i.e. using express's
res.json(ruleResult)
method).As a workaround, I've done
JSON.parse(JSON.stringify(ruleResult));
can we either:
.toJSON()
method?The text was updated successfully, but these errors were encountered: