adobe / json-formula

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

Improve toNumber() behavior #97

Closed JohnBrinkman closed 10 months ago

JohnBrinkman commented 1 year ago

Currently if toNumber() cannot convert a string to a number, it returns 0. But this doesn't allow the author to know if a conversion failed -- or if the string really was a zero. Instead, we should:

JohnBrinkman commented 1 year ago

Note that with these changes: