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
JsonLogic v3.1.0 breaks null checks #313
Comments
Thanks for the report. This seems to be related to say least another issue. I'll dig in tonight. |
Thanks, if you need anything let me know. I'm located in Europe and my day just started :) |
Minor suggestion: the var rule = System.Text.Json.JsonSerializer.Deserialize<Rule>(node.ToJsonString()); to var rule = node.Deserialize<Rule>(); I've replicated the issue, though. Continuing to dig. |
Okay. Props to the .Net team for anticipating this one. By default, the serializer skips the JSON converter for reference types when the value is But they put in a virtual property on the converter base called This fixes the issue of throwing the exception, and the rule now returns I'll have an update out shortly. |
Environment
Describe the bug
Operations like "!=", "==" and possible more against or with null are broken after upgrading to v3.1.0. They were working in v3.0.0
See the code snipped in the "To Reproduce" section for an example. The code there throws an exception like this:
To Reproduce
Code to reproduce in RoslynPad or the likes:
Expected behavior
The
.Apply()
call should return true for the test caseAdditional context
The issue doesn't exist in v3.0.0 but in 3.0.0 other things are broken therefore we've upgraded to 3.1.0
The text was updated successfully, but these errors were encountered: