Open 4c0n opened 1 month ago
Thanks for the report, I'll take a look shortly.
By the way, I just came across https://github.com/Amsterdam/pydantic-jsonlogic. I also had the idea to first try doing the implementation with Pydantic.
https://github.com/Viicos/jsonlogic was kind of a side project when I was working on https://github.com/open-formulieren/open-forms/, which you may know already. We made use of JSONLogic as well but with an old Python implementation.
cc @sergei-maertens @CharString, you might be interested.
Cool! Yeah that makes sense, I think my colleague has been in touch with some people from the open formulieren project. Unfortunately we weren't able to use this lib for our project because it does the variable lookup differently from the javascript implementation. Which is a shame really, because I feel that the quality is much better than the broken python lib on jsonlogic.com. So currently we're using the Maykin fork.
Unfortunately we weren't able to use this lib
Are you talking about this one? Because if so, note that even if the default variable lookup uses the same format as RFC 6901, you can still configure which lookup format to use and in particular I provide DotReferenceParser
, aligned with the original JS implementation.
Ah right, I totally missed that. That's actually quite useful, might have to switch back to this library eventually. I also like the type aliases, they could be very useful in our pydantic lib.
I see you edited your original post regarding a potential type error. Was it an issue on your end?
Hi first of all thanks for the effort of putting this library together!
Since version 0.1.0 the usage example seems to be broken. The output is now:
while according to the docs the output should be:
which it is in version 0.0.1