Matt Wette <matthew.we...@verizon.net> writes:

>     On Sep 21, 2015, at 1:08 PM, Ludovic Courtès <l...@gnu.org> wrote:
>
>     
>     David Thompson <da...@gnu.org> skribis:
>     
>         JSON is an commonly encountered format when writing web
>         applications,
>         much like XML, and I think it would be a good idea if the core
>         Guile
>         distribution had an SXML equivalent for JSON. This patch
>         introduces
>         such an interface in the (ice-9 json) module.
>         
>
>     There’s also guile-json, bindings to a C library, but I think it’s
>     better to have a pure Scheme implementation, and to have it in
>     Guile
>     core.
>     
>     I wonder if we should introduce it in 2.0. What do people think?
>     
>
> I would be happy to have this in the core; I have used it.

Agreed.

> 1. There is a minor typo in the source: should be "denominator.”

Indeed, good catch!

> 2. The comments say integers are converted to exact and floating point
> to inexact, but the code will convert 1.0 to exact.

In Scheme terminology, 1.0 is an integer.

>     Would it work to use the parser from (language ecmascript parse),
>     possibly restricting it? Or do you think it’s more viable to have
>     a
>     separate parser because there are too many differences?
>     
>
> I vote for separate parser, the json.scm file is lightweight.
> json.scm.go is < 17k.

Agreed.  The simplicity also allows confidence that it can safely handle
potentially malicious JSON data.

      Mark

Reply via email to