Open
Description
The is_logic
function seems to cause some confusion. Here are relevant conversations:
- "if" operation fails when using single key objects as return values #78 (comment)
- in operator doesn't support key in object or object in array of objects #27 (comment)
- "fixing" jsonLogic.is_logic method. #51 (comment)
This ticket is to find some way to reduce the confusion around the is_logic
function. I think the expectation is that the is_logic
function is validating the logic, but the function does not do that. Instead, the function is more answering the question of "is this variable something that should be interpreted as logic, versus some other thing like a primitive type.
At present, there is no robust way to validate that logic is valid, where "valid" means when the logic is executed it will not fail because of syntax or sematic errors. For example, if you execute an if
logic with 0 parameters or 4 parameters there is nothing stopping you.
Metadata
Metadata
Assignees
Labels
No labels