adobe / json-formula

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

Unexpected "fromEntries" result with `null` #160

Closed Eswcvlad closed 4 months ago

Eswcvlad commented 4 months ago

In the implementation we have this:

Based on the spec, these cases should be equivalent and return {}.

JohnBrinkman commented 4 months ago

The implementation won't coerce a null to an array-of-arrays, ~but will coerce an empty array to an array-of-arrays.~ ~I'll change the implementation to explicitly allow an empty array.~ Actually, the implementation was not coercing an empty array, but was failing to coerce null to an array of arrays.