-
Notifications
You must be signed in to change notification settings - Fork 29
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
trivial addition of NaN #48
Comments
Would you please create a pull-request here? Thanks a lot! |
I think I sent a pull request from repository below, but I've never done this before, so have no idea if I did it right. My modified version is: https://github.com/jetmonk/yason/tree/jetmonk-patch-1 |
I think I did this, but I've never done this before.
My modified version is:
https://github.com/jetmonk/yason/tree/jetmonk-patch-1
Hmmm.... looking at the change I'm not really sure
how you would achieve this, but it looks like you're
reverting all my latest changes?
master...jetmonk:jetmonk-patch-1
My only guess is that you did the changes against the
old version and then told git to reset the git HEAD
pointer to the (then newer) git HEAD without doing a
merge or rebase?!
|
Sorry. 2nd pull request submitted. Hope this one is OK. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NaNs are not supported in JSON by default (though in Perl parser apparently). Some JSON files contain them, though.
I found this to be a useful change in parse.lisp
In a followup, I appended updated version that does NaN,nan,inf,infinity,+infinity,-infinity (case insensitive). In parse-number it switches to parse-symbol if it encounters a +/- followed by 'i' or 'I' (for infinity)
Also, the original yason didn't allow a number to have a leading plus sign like {x: +99} because parse% checked only for a leading (#- #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9). This is correct according to JSON standard, but the new version loosens this restriction to allow parsing of slightly non-compliant JSON.
parse.lisp.txt
The text was updated successfully, but these errors were encountered: