Building Rule Based on JSON Object

1.8k Views Asked by At

Currently, we are exploring CodeEffects for our one of the rule engine proposal. We have a dynamic type which is a JSON string. During runtime, we need to apply the rule for JSON using CodeEffects. Is it support for FlexSource or any other possibility.

2

There are 2 best solutions below

4
On BEST ANSWER

You need to serialize your Json string into a .NET object, fill it with data if needed, and pass that object to the Evaluator together with your rule for evaluation. The FlexSource is designed specifically to support this kind of scenarios. Download the FlexSource demo project from Code Effects website and replace the XML data file used there as the source object with your Json.

0
On

@Alex, Thanks for quick reply.I downloaded source code which you mentioned the link but i couldn't find any xml source there. There is no differentiate in code which I downloaded example earlier for Type source. Both sources are look like same code.