Ticket #21 (closed defect: fixed)
can't parse non-natural numbers
Reported by: | dherman | Owned by: | dherman |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | dherman/json.plt | Keywords: | |
Cc: | Version: | ||
Racket Version: |
Description
Rob Hunter wrote:
Hi Dave,
I'm using your JSON package on PLaneT, and it's way cool. I think it
might not be quite to spec though. For example,
(require (only-in (planet "json.ss" ("dherman" "json.plt" 1 1)) (read read-json)))
(read-json (open-input-string "{ \"somekey\": 4 }"))
#hasheq((somekey . 4))
;; so far so good...
(read-json (open-input-string "{ \"somekey\": 4.1 }"))
read: expected: digits, got: .
I briefly looked at the spec linked from your help documents, and
numbers in JSON don't have to be integers, it seems. Is this a bug,
or am I missing something? thanks!
--rob