New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`.json()` does not recognize `null` #85

kseistrup opened this Issue Dec 27, 2018 · 1 comment


None yet
2 participants
Copy link

kseistrup commented Dec 27, 2018

When converting a string to JSON, null is not recognized:

⧐  "{\"x\": null}".json()
ERROR: identifier not found: null


⧐  {"x": true}.x
⧐  {"x": true}.y

This comment has been minimized.

Copy link

odino commented Dec 27, 2018

The issue is that null is not a valid identifier, and you can't assign null to a value (though the interpreter assigns null at will, for example when destructuring):

⧐  x = null
ERROR: identifier not found: null
⧐  [a, b] = [1]
⧐  b

This shouldn't be crazy, let's see if I can have a look at it over the next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment