Proposal - Truthiness (Mainly to Decide Empty Object) #29
Replies: 5 comments 7 replies
-
This guy is kinda holding up my |
Beta Was this translation helpful? Give feedback.
-
@TotalTechGeek I guess time works differently for everyone. For me personally, I can look at things coming in as a trickle, but unfortunately, I don't have time for a deluge of discussions on 3 separate GitHub issues. If you'd like my input on something specifically, please ping me. |
Beta Was this translation helpful? Give feedback.
-
I think treating empty objects as truthy would be the expected behavior for most users. |
Beta Was this translation helpful? Give feedback.
-
Self +1. Current Votes
|
Beta Was this translation helpful? Give feedback.
-
For CertLogic, I chose to consider the empty object truthy: https://github.com/ehn-dcc-development/eu-dcc-business-rules/blob/main/certlogic/specification/README.md#truthy-and-falsy-values For the case of JSON Logic, I'm guessing that all objects being (universally) truthy is probably the most consistent choice. |
Beta Was this translation helpful? Give feedback.
-
Background
I'm hopeful this proposal can pass through quickly, it mostly solidifies some conventions that already exist in
tests.json
, but we do need to decide if:Proposal
I'd personally like objects to be universally truthy, but this is completely negotiable.
json-logic-js
andjson-logic-php
treat empty object as truthy, but this is not codified intests.json
.Tests
Beta Was this translation helpful? Give feedback.
All reactions