Conversation
|
Hey @gburt, would you be interested in participating in the JSON Logic Core initiative? We've a handful of projects who've joined the org: https://github.com/orgs/json-logic/discussions/14 We ratified the existing tests.json exported as of 2024-12-19, but we're looking to add additional test cases to our test suite 😄 These are some of the currently accepted proposals: https://github.com/json-logic/.github/blob/main/ACCEPTED_PROPOSALS.md And it seems like we're about to wrap up error handling: And re-evaluating the arithmetic operators: |
|
This particular test will be "controversial" and needs a bit more community discussion as the comparison operator had no explicit coercion rules defined by test.json, so some implementations have implemented those comparison operators to always coerce the operands to numbers. [ {"<":[""," "]}, {}, true ],I'm in favor of supporting string comparison, and I believe that will be the end-result, but we'll need to specify it as an Ordinal comparison of the strings to avoid some implementations using locale by default, for maximum compatibility. |
Add a bunch of operator tests. We noticed that https://github.com/diegoholiveira/jsonlogic started returning false for
{"==": ["0", 0]}recently but still returns true if the order of the args is reversed,{"==": [0, "0"]}. The JS library returns true for both of these.