Name | Summary | Link | Tests | Phase |
---|---|---|---|---|
Respecting Backwards Compatibility | - Defines the main output of this initiative as "JSON Logic Core" - Establishes tests.json as our baseline compatibility suite for JSON Logic Core. - Introduces the concept of the "Legacy" Extension. - Defines a process for deprecating operators as we define JSON Logic Core, without breaking backwards compatibility. |
https://github.com/orgs/json-logic/discussions/16 | base.json | 3 |
Define JSON Logic on the JSON Data Model | - Defines JSON Logic on the data model of JSON Logic, (strings, numbers, true / false, null, arrays, objects) - JSON Logic may be embedded in other formats, given it provides the same constructs (e.g. YAML) - JSON Logic is not defined strictly on the lexical parsing of JSON, but on the data model constructs (whitespace, number formatting, etc is out of scope) - Core will be precision agnostic with respect to numbers. Operators will be defined from a pure math definition. - The JSON Logic Organization can mandate a "Recommended Baseline" for implementations, that can be updated as Community Extensions become more common. This is not attached to the RFC. - This mandated baseline could specify necessary supported precision(s). - Profiles / Baselines maintained by the JSON Logic Organization will be shown in our compatibility tables. |
https://github.com/orgs/json-logic/discussions/17 | N/A | 3 |
val and context replacements |
- Deprecates var , missing and missing_some to the legacy extension - Defines val , exists and ?? |
https://github.com/orgs/json-logic/discussions/18 | val.json , exists.json , coalesce.json |
1 |
Amend Test Specification / Error Handling | - Defines that errors like NaN should bubble up the AST and halt execution, unless handled. - Extends the test specification to be able to test for errors. - Introduces two new operators, throw and try - Defines that division by zero results in a NaN error. |
https://github.com/orgs/json-logic/discussions/20 | throw.json , try.json |
1 |
Linear Time Ruling | - Establishes a guideline for selecting enabled by default JSON Logic operators. - All JSON Logic Core operators must be definable to run in a worst case Linear Time; ≤ Θ(n). - Community Extensions may be recognized with operators that exceed this, but they must not be recommended for enablement by default. - This is not an implementation mandate, rather a guideline for TC and Organization members to select JSON Logic operators in a way that mitigates denial of service attacks when rules are executed from an untrusted source. |
https://github.com/orgs/json-logic/discussions/24 | N/A | 3 |
Arithmetic Operators | - The first proposal of several to evaluate existing operators and define any ambiguous behavior / improve consistency of the operators. - Defined various NaN error states (invalid string coercions, divisions by zero) - Defined Zero Argument and Single Argument and Variadic behavior for each operator ( + , - , * , / , % ) - The variadic operators are treated as foldLeft - Defined numeric coercion rules. |
https://github.com/orgs/json-logic/discussions/21 | plus.json, minus.json, multiply.json, divide.json, modulo.json | 1 |
Embedded Empty Object & Undefined Operators | - Defines that {} in the logic should be interpreted as "create an empty object" / pass-through. - Defines the throw type for undefined / unknown operators. - Defines that objects with multiple keys should throw unknown operator; though the door for multi-key operators is half-open. |
https://github.com/orgs/json-logic/discussions/30 | empty-objects.json , unknown-operators.json |
1 |
Remove Implicit Argument Sugaring | - Eliminates the principle of argument sugaring from JSON Logic, which would wrap arguments in an array if it was not an array prior to passing them into the operator. - Operators are now responsible for handling their arguments. - Some standard conventions were defined to help define operators, namely you can define { op: [n] } should match the behavior of { op: n } , and you may describe an operator as "chaining". |
https://github.com/orgs/json-logic/discussions/28 | N/A | 1* |
Truthiness | - Defines truthiness for different items in JSON Logic. - false , 0 , "" , [] , null are all defined as falsey. - All objects are defined as truthy, even empty object. |
https://github.com/orgs/json-logic/discussions/29 | truthiness.json | 1 |