Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator '==' cannot be applied to operands of type 'System.Text.Json.JsonElement' and '<null>' #629

Open
minhtranes opened this issue Sep 6, 2024 · 3 comments

Comments

@minhtranes
Copy link

Version:v5.0.3

Issue

I tried the demo/DemoApp/JSONDemo.cs and got the below error:

[11:03:38 ERR] Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator '==' cannot be applied to operands of type 'System.Text.Json.JsonElement' and '<null>'
   at CallSite.Target(Closure, CallSite, Object, Object)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)

Troubleshoot

Trying to troubleshoot, I found that the issue comes from RulesEngine.HelperFunctions.Utils.CreateAbstractClassType when it try to compare the JsonValueKind with null

if (input == null)
{
    return typeof(object);
}
@ivaylood
Copy link

Exactly the same goes for demo/DemoApp/EFDemo.cs.

@asulwer
Copy link

asulwer commented Sep 12, 2024

this repository is not being maintained anymore. move your issue to one of the maintained forks.

@minhtranes
Copy link
Author

Thank @asulwer, your fork works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants