adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Incorrect "not" results for arrays and objects #133

Closed Eswcvlad closed 5 months ago

Eswcvlad commented 5 months ago
Expression Expected Actual
[not(`[]`), not(`[1]`)]|[true, false]|[false, false]
[not(`{}`), not({a: 1})]|[true, false]|[false, false]

! operator works as expected. Looks like "not" is using JavaScript bool conversion rules, where !![] and !!{} are true.