Proposal - If / And / Or #31
Replies: 3 comments 7 replies
-
Comments from Slack:
I actually kinda agree with @JTeeuwissen, but I'm also aiming for consistency across the operators + backwards compat, hence why I recommended |
Beta Was this translation helpful? Give feedback.
-
Placeholder for tracking votes. Current Votes
|
Beta Was this translation helpful? Give feedback.
-
Removing Draft Status as Truthiness Proposal has advanced. |
Beta Was this translation helpful? Give feedback.
-
Background
This proposal is meant to codify tests and boundaries for some of the notable control structures in JSON Logic, namely
if
,or
andand
.Each of these operators are "lazy" (with full control of their traversal) and short circuit without evaluating unnecessary branches.
Proposal
Most of the test cases come from
tests.json
, with some additional checks thrown in.Some notable additions:
throw
.{}
, and mark{}
as truthy, tests may be revised depending on outcome of other proposals.Tests
if
and
or
Beta Was this translation helpful? Give feedback.
All reactions