[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] json-abnf fails to parse booleans
From: |
Vok Vojwo |
Subject: |
Re: [Chicken-users] json-abnf fails to parse booleans |
Date: |
Mon, 28 Nov 2011 10:44:56 +0100 |
2011/11/28 Ivan Raikov <address@hidden>:
>
> - due to a limitation in abnf/lexgen-derived parsers, #f cannot be a
> value returned by a parser. So the JSON true and false values are
> represented by '(#t) and '(#f).
>
Can you explain this? I tried my patch with some booleans and it seems to work:
(pp (parse-json
"{\"pi\":3.14,\"f\":false,\"t\":true,\"n\":null,\"l\":[1,2],\"s\":\"\"}"))
;; => (("pi" . 3.14) ("f" . #f) ("t" . #t) ("n" . null) ("l" . #(1 2))
("s" . ""))
(pp (parse-json "[true]"))
;; => #(#t)