-
-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
Customer customer = Customers[0];
JsonObject jsonObject = new JsonObject();
jsonObject.Add("City", "Paris");
jsonObject.Add("Column2", 1);
string query = " City = \"Paris\"";
JObject jObject = new JObject { ["City"] = "Paris", ["Column2"] = 1 };
var config = new ParsingConfig
{
ResolveTypesBySimpleName = true,
AllowNewToEvaluateAnyType = true
};
var expression = DynamicExpressionParser.ParseLambda<JObject, bool>(config, true, query);
string s = expression.ToString();
var del = expression.Compile();
var result = del.Invoke(jObject);
Check.That(result).IsEqualTo(true);
The correct running result result
is true
.
When this code is set as ParseLambda<Customer, bool>
, the result
after running is true
.
But set to
ParseLambda<JObject, bool>
ParseLambda<JsonObject, bool>
ParseLambda<dynamic, bool>
After running this code, the result is false.
I wonder what's wrong?
Metadata
Metadata
Assignees
Labels
No labels